WP_Speculation_Rules::is_valid_eagerness
Checks whether the given speculation rules eagerness is valid.
Метод класса: WP_Speculation_Rules{}
Хуков нет.
Возвращает
bool. True if valid, false otherwise.
Использование
$result = WP_Speculation_Rules::is_valid_eagerness( $eagerness ): bool;
- $eagerness(разное) (обязательный)
- Speculation rules eagerness.
Список изменений
| С версии 6.8.0 | Введена. |
| С версии 7.1.0 | The $eagerness param now allows mixed and not just string. |
Код WP_Speculation_Rules::is_valid_eagerness() WP Speculation Rules::is valid eagerness WP 7.1.3
public static function is_valid_eagerness( $eagerness ): bool {
return is_string( $eagerness ) && isset( self::$eagerness_allowlist[ $eagerness ] );
}