wp-includes/class-wp-speculation-rules.php:254Checks whether the given ID is valid.
$idstringbool private function is_valid_id( string $id ): bool { return (bool) preg_match( '/^[a-z][a-z0-9_-]+$/', $id ); }Introduced in 6.8.0. Unchanged from 6.8.8 through 7.1.0.
Signature, return type and hooks compared across 4 parsed releases.
src/wp-includes/class-wp-speculation-rules.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.