WP_Scripts::is_delayed_strategy
Checks if the strategy passed is a valid delayed (non-blocking) strategy.
Метод класса: WP_Scripts{}
Хуков нет.
Возвращает
true|false. True if $strategy is one of the delayed strategies, otherwise false.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_delayed_strategy( $strategy ): bool;
- $strategy(строка|разное) (обязательный)
- The strategy to check.
Список изменений
| С версии 6.3.0 | Введена. |
Код WP_Scripts::is_delayed_strategy() WP Scripts::is delayed strategy WP 6.9.1
private function is_delayed_strategy( $strategy ): bool {
return in_array(
$strategy,
$this->delayed_strategies,
true
);
}