Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 2nd, 2013  |  syntax: PHP  |  size: 0.95 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }