WP_Speculation_Rules::is_valid_source
Checks whether the given speculation rules source 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_source( $source ): bool;
- $source(string) (required)
- Speculation rules source.
Changelog
| Since 6.8.0 | Introduced. |
WP_Speculation_Rules::is_valid_source() WP Speculation Rules::is valid source code WP 7.0
public static function is_valid_source( string $source ): bool {
return isset( self::$source_allowlist[ $source ] );
}