[wp-trac] [WordPress Trac] #38292: Introduce exclusion for WP_Theme::scandir()

WordPress Trac noreply at wordpress.org
Wed Oct 12 11:52:11 UTC 2016


#38292: Introduce exclusion for WP_Theme::scandir()
-------------------------+------------------------------------------
 Reporter:  lukasbesch   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:  4.6.1
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  administration, performance
-------------------------+------------------------------------------

Comment (by dd32):

 given the line before it is `if ( '.' == $result[0] ) continue; ` which is
 mostly used to skip `.svn` folders, and there's a `CVS` check within the
 next block, it's probably worth just hard-coding `node_modules` into the
 code here to skip for everyone (given how common it is to use a node-based
 development method today).

 To make it more readable we can define those skip-directories as an array
 that's filtered if it makes it more readable.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38292#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list