Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#8327 closed enhancement (wontfix)

Contextual Help Enhancement

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

Description

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:

<?php
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
18 years ago

  • Milestone 2.7 → 2.8

Sending to 2.8 for feature freeze.

#2 @ryan
18 years ago

  • Milestone 2.8
  • Resolution → wontfix
  • Status new → 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
18 years ago

Alright. Thanks.

Note: See TracTickets for help on using tickets.