plugin_files_exclusions filter-hookWP 4.9.0

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

Usage

add_filter( 'plugin_files_exclusions', 'wp_kama_plugin_files_exclusions_filter' );

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

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

Changelog

Since 4.9.0 Introduced.

Where the hook is called

get_plugin_files()
plugin_files_exclusions
wp-admin/includes/plugin.php 242
$exclusions = (array) apply_filters( 'plugin_files_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );

Where the hook is used in WordPress

Usage not found.