[wp-trac] [WordPress Trac] #8964: Allow adding headers to get_plugin_data

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 27 03:59:32 UTC 2009


#8964: Allow adding headers to get_plugin_data
-------------------------+--------------------------------------------------
 Reporter:  strider72    |       Owner:  westi                        
     Type:  enhancement  |      Status:  accepted                     
 Priority:  normal       |   Milestone:  2.9                          
Component:  Plugins      |     Version:                               
 Severity:  normal       |    Keywords:  has-patch tested commit early
-------------------------+--------------------------------------------------

Comment(by strider72):

 Just added a patch that fixes a bug in the previous patch.  No other
 changes, though it's nice to see it still applies clean. :)

 Westi, could you please take a look at this again?  I would really like
 this committed for 2.9.  Not sure if something particular is holding it
 up.

 This patch:

 1) adds extra_plugin_headers hook so plugins can add to the list of
 headers that are checked for in get_plugin_data().

 2) adds extra_theme_headers hook.  Same as above, but for themes.

 3) adds new function get_file_data() so that plugins can use a standard
 method to examine a particular file for plugin-like headers.  Function can
 even be used to add an arbitrary extra_XXX_headers hook.

 4) Both get_plugin_data() and get_theme_data() now use get_file_data() for
 their core functionality, removing some code repetition from core.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/8964#comment:38>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list