Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Help Overview

Chris Reynolds edited this page Feb 17, 2014 · 3 revisions

How is content displayed in the Help Overview

Within the Ah-O2 plugin we've re-used the existing WP_Screen class that already exists in the WordPress Core (it is stored in the $current_screen global). This means that any help content that already exists will automatically be displayed. Within the plugin we have full control on overwriting or adding to the existing content.

Where do I modify Help Content

Within the WordPress-Admin-Help plugin there is the docs folder. In this folder are individual php files for admin pages based on their slugs (Ex. plugins.php is the Plugins Admin Page). You can add help content in these files. If no file exists for an admin page you can copy an existing file and rename it.

How do I modify Help Content

By default existing content is already defined, If you would like to remove the existing help content you will need to reset the proper variables of the $current_screen object.

$current_screen->_help_tabs = array();

$current_screen->_help_sidebar = '';

To add a new Help Section to the page you use the add_help_tab() function of the $current_screen object. This function accepts an associated array containing id, title and content.

$current_screen->add_help_tab( array(
	'id'      => 'New Help',
	'title'   => __('New Help'),
	'content' => '<p>Some Help Text</p><p>More Content</p>',
) );

You can add as many Help sections as desired for the page.

What is the purpose of the _help_sidebar?

The _help_sidebar is a legacy property that displays additional reference links. Currently the plugin converts this content into an "Additional Resources" section of the Help Content. This is not required to be used.

Clone this wiki locally