wp-includes/class-wp-speculation-rules.php:269Checks whether the given speculation rules mode is valid.
$modemixedbool public static function is_valid_mode( $mode ): bool { return is_string( $mode ) && 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.