[wp-trac] [WordPress Trac] #8172: contextual_help filter not very useful

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 12 13:29:31 GMT 2008


#8172: contextual_help filter not very useful
----------------------------+-----------------------------------------------
 Reporter:  filosofo        |       Owner:  anonymous                
     Type:  defect          |      Status:  new                      
 Priority:  normal          |   Milestone:  2.7                      
Component:  Administration  |     Version:  2.7                      
 Severity:  normal          |    Keywords:  contextual_help has-patch
----------------------------+-----------------------------------------------
 The new (as of 2.7) 'contextual_help' filter just allows you to make
 boolean changes, viz. whether or not to show the contextual_help.  This
 makes it almost useless.

 Instead, it should allow plugins to filter the help content, and it should
 pass useful information.  (The $screen variable it uses is not very
 specific).

 That way plugins can add help information to specific pages.

 My patch passes the "suffix" of the page to the contextual_help filter, so
 plugins can easily add help to specific pages.

 Also, as a bonus I cleaned up some unnecessarily verbose related code:
  * wp-admin/admin-header.php was making the suffixes into an array
 consisting of the suffix and a blank string, in what I guess was an
 attempt to save code but actually generated more lines.
  * the logic adding tinymce to the correct admin_head action was overkill.

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


More information about the wp-trac mailing list