Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#8327 closed enhancement (wontfix)

Contextual Help Enhancement

Reported by: jick Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Plugins Keywords: dev-feedback
Focuses: Cc:


How about the ability to specify one contextual help item for multiple pages? I would guess a way to achieve this would be to allow an array as well as a string for the first parameter of the add_contextual_help function. Not sure if that would actually work but it's an idea.

Something like:

add_action('admin_menu', 'add_pages');

function add_pages() {
  $my_first_page = add_submenu_page('options-general.php', 'My First Page', 'My First Page', 'manage_options', 'my-first-page', 'my_first_page');
  $my_second_page = add_submenu_page('options-general.php', 'My Second Page', 'My Second Page', 'manage_options', 'my-second-page', 'my_second_page');
  $my_third_page = add_submenu_page('options-general.php', 'My Third Page', 'My Third Page', 'manage_options', 'my-third-page', 'my_third_page');

  $pages = array($my_first_page, $my_second_page, $my_third_page);

  add_contextual_help($pages, '<a href="http://www.test.com/">My Help Page</a>');

  function my_first_page() {
    echo('Some stuff...');

  function my_second_page() {
    echo('Some more stuff...');

  function my_third_page() {
    echo('Some other stuff...');

What do others think of this? Is it even something that would be useful to add? I think it would be useful. The only alternative I can see is to specify the same help item multiple times for each page.

Sorry if this is already possible and I'm just missing something...

Change History (3)

#1 @jacobsantos
9 years ago

  • Milestone changed from 2.7 to 2.8

Sending to 2.8 for feature freeze.

#2 @ryan
9 years ago

  • Milestone 2.8 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Since the help is meant to be contextual per page, I doubt there is much of a market for this. Assigning the help text to a variable and calling add_contextual_help() multiple times seems good enough.

#3 @jick
9 years ago

Alright. Thanks.

Note: See TracTickets for help on using tickets.