WP_Scripts::is_valid_fetchpriority() – Method | Developer.WordPress.org
Checks if the provided fetchpriority is valid.
Parameters
$prioritystring|mixedrequiredFetch priority.
Return
bool Whether valid fetchpriority.Source
private function is_valid_fetchpriority( $priority ): bool {
return in_array( $priority, array( 'auto', 'low', 'high' ), true );
}
| Used by | Description |
|---|---|
WP_Scripts::get_highest_fetchpriority_with_dependents()wp-includes/class-wp-scripts.php | Gets the highest fetch priority for a given script and all of its dependent scripts. |
WP_Scripts::add_data()wp-includes/class-wp-scripts.php | This overrides the add_data method from WP_Dependencies, to support normalizing of $args. |
WP_Scripts::do_item()wp-includes/class-wp-scripts.php | Processes a script dependency. |
Changelog
| Version | Description |
|---|---|
| 6.9.0 | Introduced. |