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

WordPress Trac noreply at wordpress.org
Thu Jun 29 02:53:01 UTC 2017


#38292: Introduce exclusion for WP_Theme::scandir()
--------------------------------+------------------------------------------
 Reporter:  lukasbesch          |       Owner:  rachelbaker
     Type:  enhancement         |      Status:  closed
 Priority:  normal              |   Milestone:  4.7.4
Component:  Themes              |     Version:  4.6.1
 Severity:  normal              |  Resolution:  fixed
 Keywords:  has-patch fixed-    |     Focuses:  administration, performance
  major                         |
--------------------------------+------------------------------------------

Comment (by alexvorn2):

 Hi all! But how it works? How to exclude a folder?

 I use this code and it seems not to work:
 {{{#!php
 <?php
 function exclude_includes_folder( $folders = array() ) {
         $folders[] = 'includes';

         return $folders;
 } add_filter( 'theme_scandir_exclusions', 'exclude_includes_folder' );
 }}}

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


More information about the wp-trac mailing list