WP_Scripts::is_delayed_strategy
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 ): bool;
- $strategy(string|mixed) (required)
- The strategy to check.
Changelog
| Since 6.3.0 | Introduced. |
WP_Scripts::is_delayed_strategy() WP Scripts::is delayed strategy code WP 6.9.1
private function is_delayed_strategy( $strategy ): bool {
return in_array(
$strategy,
$this->delayed_strategies,
true
);
}