W3cubDocs

/WordPress

WP_Scripts::is_delayed_strategy( string $strategy ): bool

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

Parameters

$strategystringrequired
The strategy to check.

Return

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

Source

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

Changelog

Version Description
6.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_scripts/is_delayed_strategy