Archive for: November, 2011

Adding or Removing Profile Fields

Nov 22 2011 Published by under Wordpress


function my_contactmethods( $contactmethods ) {

	// add
	$contactmethods['twitter'] = 'Twitter';
	$contactmethods['facebook'] = 'Facebook';
	$contactmethods['blog'] = 'Blog';
	
	// remove
	unset($contactmethods['aim']);
	unset($contactmethods['jabber']);
	unset($contactmethods['yim']);

	return $contactmethods;
}
add_filter('user_contactmethods','my_contactmethods',10,1);

No responses yet

Slideshow Gallery not displaying after recent update

Nov 21 2011 Published by under Wordpress

/*
// Inclusion: Einbindung von Slideshow Gallery  Pro || Fritz
echo "";
echo do_shortcode('[gpslideshow custom=1 align=right thumbs=off caption=on auto=on]');
echo "";
*/

// Inclusion: Slideshow Gallery Standard || Fritz || 22/11/2011
echo "";
echo do_shortcode('[slideshow custom=1]');
echo "";

No responses yet

Adding a meta_box to all Post Types

Nov 21 2011 Published by under Wordpress

$post_types = get_post_types( array( '_builtin' => false ), 'objects' );  // Gets all custom types
       array_push( $post_types, get_post_type_object( 'post' ), get_post_type_object( 'page')  ); // Adds back the 'post' and 'page' types while ommitting attachments, revisions, menus, etc.
       foreach ( $post_types as $type ) {
               add_meta_box( . . . );
       }

No responses yet

WP-o-Matic breaks WordPress Related Links

Nov 08 2011 Published by under PHP, Wordpress

function adminInit() {
		auth_redirect();

		// force display of a certain section
		$this->section = ($this->setup) ? ((isset($_REQUEST['s']) && $_REQUEST['s']) ? $_REQUEST['s'] : $this->sections[0]) : 'setup';
		
//    if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
//      die('Please switch to Firefox / Safari');

		wp_enqueue_script('prototype');
		wp_enqueue_script('wpoadmin', $this->tplpath . '/admin.js', array('prototype'), $this->version);

		if ($this->section == 'list')
			wp_enqueue_script('listman');

		//if ( WPOTools::isAjax() ) {
		if ( WPOTools::isAjax() &&  $this->section != 'home' ) { // Matt Thiessen 11/8/11
			$this->admin();
			exit;
		}
	}

No responses yet