Advertisement
gilzow

Add Help menu

Feb 6th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. function addHelpMenu()
  2. {
  3.     $objScreen = get_current_screen();
  4.     if ($objScreen->post_type == 'post') {
  5.         if (FALSE !== $strHelpContents = file_get_contents(dirname(__FILE__).DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'sampleHelp.html')) {
  6.             $objScreen->add_help_tab(array(
  7.                 'id' => 'sample_help_tab',
  8.                 'title' => 'Sample Help Tab',
  9.                 'content' => $strHelpContents,
  10.             ));
  11.         }
  12.     }
  13. }
  14.  
  15. add_action('load-post.php','addHelpMenu');
  16. add_action('load-post-new.php','addHelpMenu');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement