Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Put the post editor in a metabox for easy moving
- */
- add_action('admin_init','admin_init_hook');
- function admin_init_hook()
- {
- function blank(){}
- foreach (array('page','post','custom_type') as $type)
- {
- add_meta_box('custom_editor', 'Content', 'blank', $type, 'normal', 'high');
- }
- }
- add_action('admin_head','admin_head_hook');
- function admin_head_hook()
- { ?>
- <style type="text/css">
- #postdiv.postarea, #postdivrich.postarea { margin:0; }
- #post-status-info { line-height:1.4em; font-size:13px; }
- #custom_editor .inside { margin:2px 6px 6px 6px; }
- #ed_toolbar { display:none; }
- #postdiv #ed_toolbar, #postdivrich #ed_toolbar { display:block; }
- .postarea #wp-content-media-buttons { margin-top: 7px; }
- </style> <?php
- }
- add_action('admin_footer','admin_footer_hook');
- function admin_footer_hook()
- { ?>
- <script type="text/javascript">
- jQuery('#postdiv, #postdivrich').prependTo('#custom_editor .inside');
- </script> <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement