[wp-trac] [WordPress Trac] #9532: Get the readme.txt metadata

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 24 14:30:07 UTC 2010


#9532: Get the readme.txt metadata
-------------------------+--------------------------------------------------
 Reporter:  Txanny       |        Owner:                
     Type:  enhancement  |       Status:  closed        
 Priority:  normal       |    Milestone:  Future Release
Component:  Plugins      |      Version:  2.7.1         
 Severity:  normal       |   Resolution:  fixed         
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by hakre):

  * keywords:  needs-patch close =>
  * status:  new => closed
  * resolution:  => fixed


Comment:

 This is now ''somehow'' possible by passing the Metadata Header Fields in
 the form of an array to get_file_data() now (untested example code):

 {{{
 $default = array(
     'Contributors',
     'Donate link',
     'Tags',
     'Requires at least',
     'Tested up to',
     'Stable tag'
 );
 $default = array_combine($default, $default); // w/o key this does not
 work
 $data    = get_file_data('readme.txt', $default);
 print( 'Contributors' . $data[Contributors] );
 }}}

 I think when this ticket was created get_file_data() did not exist or was
 in parallel or was just very new (#8964 / [12044]). I'll close this ticket
 now because some adequate functions that works for this case exists today
 (just tested it in a plugin of my own). Feel free to re-open if you see
 fit.

 Additionally there is another suggestion to
 [http://core.trac.wordpress.org/ticket/13699 make everything File Header
 related more modular]. That's the related ticket I just linked in my
 previous comment.

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


More information about the wp-trac mailing list