Skip to content

Instantly share code, notes, and snippets.

@shobujroy
Created February 16, 2015 04:21
Show Gist options
  • Select an option

  • Save shobujroy/d2be4327799bf4e52edd to your computer and use it in GitHub Desktop.

Select an option

Save shobujroy/d2be4327799bf4e52edd to your computer and use it in GitHub Desktop.
Moved text editor into a box in wordpress
/**
* Moved text editor into a box
*/
add_action('admin_init','admin_init_hook');
function admin_init_hook() {
$social_options = get_option ('twl_cpt_option');
$slug = $social_options['cpt_slug'];
function blank(){}
foreach (array(''.$slug.'') as $type)
{
add_meta_box('custom_editor', 'Content', 'blank', $type, 'normal', 'high');
}
}
/*
*
* Add this script
*
*/
jQuery('#postdiv, #postdivrich').prependTo('#custom_editor .inside');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment