wp_is_theme_directory_ignored() WordPress Function
The wp_is_theme_directory_ignored() function is used to check if a theme directory is being ignored by WordPress.
wp_is_theme_directory_ignored( string $path ) #
Filters theme directories that should be ignored during export.
Parameters
- $path
(string)(Required)The path of the file in the theme.
Return
(Bool) Whether this file is in an ignored directory.
Source
File: wp-includes/block-template-utils.php
913 914 915 916 917 918 919 920 921 922 | function wp_is_theme_directory_ignored( $path ) { $directories_to_ignore = array ( '.svn' , '.git' , '.hg' , '.bzr' , 'node_modules' , 'vendor' ); foreach ( $directories_to_ignore as $directory ) { if ( strpos ( $path , $directory ) === 0 ) { return true; } } return false; } |
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |