[wp-trac] Re: [WordPress Trac] #9452: Plugin Editor lists all files in plugin - should limit to text only

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 3 20:01:52 GMT 2009


#9452: Plugin Editor lists all files in plugin - should limit to text only
----------------------------+-----------------------------------------------
 Reporter:  jbsil           |        Owner:  jbsil   
     Type:  defect (bug)    |       Status:  reopened
 Priority:  normal          |    Milestone:  2.8     
Component:  Administration  |      Version:  2.8     
 Severity:  normal          |   Resolution:          
 Keywords:  needs-patch     |  
----------------------------+-----------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  plugin-editor has-patch needs-testing => needs-patch


Comment:

 Maybe add .text and .htm to the list, and lowercase the extension before
 checking?

 Also, it won't work with a weird plugin name like foo.bar/foo.bar.php

 Aside, and for what it's worth... testing reveals that using an anchored
 regex such as /\.([^.]+)$/ is much faster than using php's pathinfo().

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


More information about the wp-trac mailing list