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

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 22 03:49:51 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):

 Replying to [comment:21 Denis-de-Bernardy]:
 > Picture a third party looking into adding headers that your plugin adds,
 without you knowing it.

 This doesn't make sense (at least it's not a problem).  So what if two
 plugins add the same header?  Because the header is the array key, it's
 only added once, and because the returned parameter *is* the Header Name,
 they both add the same header that will return the same parameter within
 the plugin_data array.  So it's no problem.

 ...unless your patch does something different than mine did.  If you add
 "New Header", then

 New Header: foo

 gets us plugin_data['New Header'] = 'foo'

 It doesn't matter which one, or how many, different plugins add "New
 Header".  If it's added it's added for *all* plugins.  (And as most
 plugins won't have that custom header, they'll just return "".)

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


More information about the wp-trac mailing list