plugin_files_exclusions
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
plugin_files_exclusions
wp-admin/includes/plugin.php 247
$exclusions = (array) apply_filters( 'plugin_files_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );