Category: Admin Area

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:

https://gist.github.com/foxydot/9075575.js

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.

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');
		}
	}

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
}