plugin_files_exclusions

plugin_files_exclusions

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('plugin_files_exclusions') is found 1 times:

  • /wp-admin/includes/plugin.php line 247
    		 * @since 4.9.0
    		 *
    		 * @param string[] $exclusions Array of excluded directories and files.
    		 */
    		$exclusions = (array) apply_filters( 'plugin_files_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );
    
    		$list_files = list_files( $dir, 100, $exclusions );
    		$list_files = array_map( 'plugin_basename', $list_files );
    
    		$plugin_files = array_merge( $plugin_files, $list_files );
    		$plugin_files = array_values( array_unique( $plugin_files ) );