theme_scandir_exclusions
Filters the array of excluded directories and files while scanning theme folder.
Description
Parameters (1)
- 0. $array (callback) =>
array( 'CVS', 'node_modules' )
- Array of excluded directories and files.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'theme_scandir_exclusions', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the theme_scandir_exclusions callback
- function filter_theme_scandir_exclusions( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'theme_scandir_exclusions', 'filter_theme_scandir_exclusions', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'theme_scandir_exclusions', 'filter_theme_scandir_exclusions', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/class-wp-theme.php
- $exclusions = (array) apply_filters( 'theme_scandir_exclusions', array( 'CVS', 'node_modules' ) );