#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)
Note:
See TracTickets
for help on using tickets.
Sending to 2.8 for feature freeze.