Created
August 13, 2013 21:33
-
-
Save johnpbloch/6225918 to your computer and use it in GitHub Desktop.
Add a contextual help tab to the screen
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
<?php | |
add_action('current_screen', 'jpb_current_screen'); | |
/** | |
* @param WP_Screen $screen The current screen object | |
*/ | |
function jpb_current_screen($screen){ | |
if($screen->post_type === 'my_custom_post_type'){ | |
$screen->add_help_tab(array( | |
'id' => 'unique_id', | |
'title' => 'Human Readable Title', | |
'content' => "<p>This is the help text</p> | |
<p>It's just HTML, so you can do anything you want with it</p>", | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment