Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.95 KB | None | 0 0
  1. /**
  2.  * Put the post editor in a metabox for easy moving
  3.  */
  4.  
  5. add_action('admin_init','admin_init_hook');
  6. function admin_init_hook()
  7. {
  8.     function blank(){}
  9.    
  10.     foreach (array('page','post','custom_type') as $type)
  11.     {
  12.         add_meta_box('custom_editor', 'Content', 'blank', $type, 'normal', 'high');
  13.     }
  14. }
  15. add_action('admin_head','admin_head_hook');
  16.  
  17. function admin_head_hook()
  18. { ?>
  19. <style type="text/css">
  20. #postdiv.postarea, #postdivrich.postarea { margin:0; }
  21. #post-status-info { line-height:1.4em; font-size:13px; }
  22. #custom_editor .inside { margin:2px 6px 6px 6px; }
  23. #ed_toolbar { display:none; }
  24. #postdiv #ed_toolbar, #postdivrich #ed_toolbar { display:block; }
  25. .postarea #wp-content-media-buttons { margin-top: 7px; }
  26. </style> <?php
  27. }
  28.  
  29. add_action('admin_footer','admin_footer_hook');
  30. function admin_footer_hook()
  31. { ?>
  32. <script type="text/javascript">
  33.         jQuery('#postdiv, #postdivrich').prependTo('#custom_editor .inside');
  34. </script> <?php
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement