WP_Script_Modules::is_valid_fetchpriorityprivateWP 6.9.0

Checks if the provided fetchpriority is valid.

Method of the class: WP_Script_Modules{}

No Hooks.

Returns

true|false. Whether valid fetchpriority.

Usage

// private - for code of main (parent) class only
$result = $this->is_valid_fetchpriority( $priority ): bool;
$priority(string|mixed) (required)
Fetch priority.

Changelog

Since 6.9.0 Introduced.

WP_Script_Modules::is_valid_fetchpriority() code WP 6.9.1

private function is_valid_fetchpriority( $priority ): bool {
	return in_array( $priority, $this->priorities, true );
}