WP_Styles::in_default_dir
Whether a handle's source is in a default directory.
Method of the class: WP_Styles{}
No Hooks.
Returns
true|false. True if found, false if not.
Usage
global $wp_styles; $wp_styles->in_default_dir( $src );
- $src(string) (required)
- The source of the enqueued style.
Changelog
| Since 2.8.0 | Introduced. |
WP_Styles::in_default_dir() WP Styles::in default dir code WP 7.0
public function in_default_dir( $src ) {
if ( ! $this->default_dirs ) {
return true;
}
foreach ( (array) $this->default_dirs as $test ) {
if ( str_starts_with( $src, $test ) ) {
return true;
}
}
return false;
}