[wp-trac] [WordPress Trac] #8327: Contextual Help Enhancement

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 24 06:36:55 GMT 2008


#8327: Contextual Help Enhancement
-------------------------+--------------------------------------------------
 Reporter:  jick         |       Owner:              
     Type:  enhancement  |      Status:  new         
 Priority:  normal       |   Milestone:  2.7         
Component:  Plugins      |     Version:  2.7         
 Severity:  normal       |    Keywords:  dev-feedback
-------------------------+--------------------------------------------------
 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...

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8327>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list