[wp-trac] [WordPress Trac] #6531: Recursively search for files in theme and plugin editors

WordPress Trac noreply at wordpress.org
Mon Apr 15 15:49:05 UTC 2013


#6531: Recursively search for files in theme and plugin editors
-------------------------------------+-----------------------------
 Reporter:  torbens                  |       Owner:  chsxf
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  Future Release
Component:  Template                 |     Version:  2.5
 Severity:  minor                    |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+-----------------------------

Comment (by Daedalon):

 3. In order to improve performance, instead of calling this function twice
 inside a loop:
 {{{
 plugin_basename("$dir/$file")
 }}}

 Split it into these parts, the first of which is to be called only once in
 the beginning of the function:


 {{{
 $plugin_basedir = plugin_basename($dir);
 ...
 "$plugin_basedir/$file"
 }}}

 The patch in #24049 also applies this change.

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


More information about the wp-trac mailing list