wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_is_theme_directory_ignored › WordPress Function

Da6.0.0
Deprecaton/a
› wp_is_theme_directory_ignored ( $path )
Parametri:
  • (string) $path The path of the file in the theme.
    Richiesto: Sì
Ritorna:
  • (bool) Whether this file is in an ignored directory.
Definito a:
Codex:

Determines whether a theme directory should be ignored during export.



Sorgenti

function wp_is_theme_directory_ignored( $path ) {
	$directories_to_ignore = array( '.DS_Store', '.svn', '.git', '.hg', '.bzr', 'node_modules', 'vendor' );

	return array_any( $directories_to_ignore, fn( $directory ) => str_starts_with( $path, $directory ) );
}