Skip to content

Instantly share code, notes, and snippets.

@mrbobbybryant
Created January 28, 2015 13:23
Show Gist options
  • Save mrbobbybryant/34327461d89a26efebf0 to your computer and use it in GitHub Desktop.
Save mrbobbybryant/34327461d89a26efebf0 to your computer and use it in GitHub Desktop.
Adding items to the help tab.
<?php
function my_contextual_help( $contextual_help, $screen_id, $screen ) {
if ( 'job' == $screen->id ) {
$contextual_help = '<h2>Products</h2>
<p>Products show the details of the items that we sell on the website. You can see a list of them on this page in reverse chronological order - the latest one we added is first.</p>
<p>You can view/edit the details of each product by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';
} elseif ( 'edit-product' == $screen->id ) {
$contextual_help = '<h2>Editing products</h2>
<p>This page allows you to view/modify product details. Please make sure to fill out the available boxes with the appropriate details (product image, price, brand) and <strong>not</strong> add these details to the product description.</p>';
}
return $contextual_help;
}
add_action( 'contextual_help', 'my_contextual_help', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment