Created
February 16, 2015 04:21
-
-
Save shobujroy/d2be4327799bf4e52edd to your computer and use it in GitHub Desktop.
Moved text editor into a box in wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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