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

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 29 18:12:28 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 westi):

 Replying to [comment:32 strider72]:
 > 1) Good idea, since it doesn't allow you to change the existing headers
 >
 > 2) Could you explain what you mean?  The only thing that matters in the
 returned array is the values.  Keys are irrelevant.  In the final it uses
 $value => $value for the new header
 >

 Give extra headers the same ability as the built in ones - i.e. the key
 name that ends up in the array can be different from the string matched in
 the file.

 > 3) It already does this:
 > {{{$all_headers = array_merge($extra_headers, $default_headers);}}}

 True - I was refering to removing all the array_flippery which seemed like
 a bit over the top - just make the requirements on the plugin behaviour
 like I suggest about and then that can all be stripped out.

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


More information about the wp-trac mailing list