WP_Scripts::is_delayed_strategyprivateWP 6.3.0

Checks if the strategy passed is a valid delayed (non-blocking) strategy.

Method of the class: WP_Scripts{}

No Hooks.

Returns

true|false. True if $strategy is one of the delayed strategies, otherwise false.

Usage

// private - for code of main (parent) class only
$result = $this->is_delayed_strategy( $strategy );
$strategy(string) (required)
The strategy to check.

Changelog

Since 6.3.0 Introduced.

WP_Scripts::is_delayed_strategy() code WP 6.8.1

private function is_delayed_strategy( $strategy ) {
	return in_array(
		$strategy,
		$this->delayed_strategies,
		true
	);
}