WP_Speculation_Rules::is_valid_eagerness
Checks whether the given speculation rules eagerness is valid.
Method of the class: WP_Speculation_Rules{}
No Hooks.
Returns
true|false
. True if valid, false otherwise.
Usage
$result = WP_Speculation_Rules::is_valid_eagerness( $eagerness ): bool;
- $eagerness(string) (required)
- Speculation rules eagerness.
Changelog
Since 6.8.0 | Introduced. |
WP_Speculation_Rules::is_valid_eagerness() WP Speculation Rules::is valid eagerness code WP 6.8.1
public static function is_valid_eagerness( string $eagerness ): bool { return isset( self::$eagerness_allowlist[ $eagerness ] ); }