theme_scandir_exclusions хук-фильтрWP 4.7.4

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

Использование

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.

Список изменений

С версии 4.7.4 Введена.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.