Browsing "Admin Area"
Feb 18, 2014 - Admin Area, WordPress    Comments Off on WPAlchemy repeating fileds and the wp_editor()

WPAlchemy repeating fileds and the wp_editor()

I may have something working. I’m still doing some testing, but I think the problem lies here:
” $editor_id (string) (required) HTML id attribute value for the textarea and TinyMCE. (may only contain lower-case letters)” (http://codex.wordpress.org/Function_Reference/wp_editor)

When you try to pass $mb->get_the_name(), it inputs all kinds of brackets and such, which are disallowed characters. Here’s where I’m at:

Using sanitize_key removes those illegal characters. Adding ‘textarea_name’=>$mb->get_the_name() to the settings array re-targets the input to that hidden textbox.

I’m using Extract Mode (I always do, for searchability) and so far it seems to be working.

Jun 25, 2013 - Admin Area, WordPress    Comments Off on Custom Login Page

Custom Login Page

Putting a custom login logo (or any other custom login styling) in place:

//Logo for login page
function custom_login_logo() {
	echo '<style type="text/css">
		#login h1 a { background-image: url('.INSERTLOGOHERE.') !important; }
	</style>';
}
add_action('login_head', 'custom_login_logo');
Apr 9, 2013 - Admin Area    Comments Off on Change Title Entry Text on CPT

Change Title Entry Text on CPT

The hook:

		add_filter( 'enter_title_here', array(&$this,'change_default_title') );

The actual filter:

	function change_default_title( $title ){
		$screen = get_current_screen();
		if  ( $screen->post_type == 'msd_team' ) {
			return __('Enter Team Member (FirstName Lastname) Here','msd_roster');
		}
	}
Feb 13, 2013 - Admin Area, WordPress    Comments Off on Move meta box above editor

Move meta box above editor

add_action('admin_footer','subtitle_footer_hook');
function subtitle_footer_hook()
{
	?><script type="text/javascript">
	jQuery('#titlediv').after(jQuery('#_speaker_title_metabox'));
	jQuery('#_speaker_title_metabox').after(jQuery('#_speakers_metabox'));
	</script><?php
}