wp-includes/class-wp-speculation-rules.php:266Checks whether the given speculation rules mode is valid.
$modestringbool public static function is_valid_mode( string $mode ): bool { return isset( self::$mode_allowlist[ $mode ] ); }Introduced in 6.8.0. One change between 6.8.8 and 7.1.0.
Signature, return type and hooks compared across 4 parsed releases.
$mode retyped from string to mixed.verified against sourcesrc/wp-includes/class-wp-speculation-rules.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.