WP_Styles::in_default_dir() WordPress Method
The WP_Styles::in_default_dir() method is used to check if a given stylesheet is in the default directory.
WP_Styles::in_default_dir( string $src ) #
Whether a handle’s source is in a default directory.
Parameters
- $src
(string)(Required)The source of the enqueued style.
Return
(bool) True if found, false if not.
Source
File: wp-includes/class.wp-styles.php
public function in_default_dir( $src ) {
if ( ! $this->default_dirs ) {
return true;
}
foreach ( (array) $this->default_dirs as $test ) {
if ( 0 === strpos( $src, $test ) ) {
return true;
}
}
return false;
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |