theme_scandir_exclusions filter-hookWP 4.7.4

Filters the array of excluded directories and files while scanning theme folder.

Usage

add_filter( 'theme_scandir_exclusions', 'wp_kama_theme_scandir_exclusions_filter' );

/**
 * Function for `theme_scandir_exclusions` filter-hook.
 * 
 * @param string[] $exclusions Array of excluded directories and files.
 *
 * @return string[]
 */
function wp_kama_theme_scandir_exclusions_filter( $exclusions ){

	// filter...
	return $exclusions;
}
$exclusions(string[])
Array of excluded directories and files.

Changelog

Since 4.7.4 Introduced.

Where the hook is called

WP_Theme::scandir()
theme_scandir_exclusions
wp-includes/class-wp-theme.php 1388
$exclusions = (array) apply_filters( 'theme_scandir_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );

Where the hook is used in WordPress

Usage not found.