Title: plugin_files_exclusions
Published: November 20, 2017
Last modified: February 24, 2026

---

# apply_filters( ‘plugin_files_exclusions’, string[] $exclusions )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#wp--skip-link--target)

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#parameters)󠁿

 `$exclusions`string[]

Array of excluded directories and files.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#source)󠁿

    ```php
    $exclusions = (array) apply_filters( 'plugin_files_exclusions', array( 'CVS', 'node_modules', 'vendor', 'bower_components' ) );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/plugin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/plugin.php#L247)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/plugin.php#L247-L247)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#related)󠁿

| Used by | Description | 
| [get_plugin_files()](https://developer.wordpress.org/reference/functions/get_plugin_files/)`wp-admin/includes/plugin.php` |

Gets a list of a plugin’s files.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/plugin_files_exclusions/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.9.0](https://developer.wordpress.org/reference/since/4.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fplugin_files_exclusions%2F)
before being able to contribute a note or feedback.