wp-includes/class-wp-block-metadata-registry.php:268Checks whether the given block metadata collection path is valid against the list of collection roots.
$pathstring$collection_rootsstring[]bool private static function is_valid_collection_path( $path, $collection_roots ) { foreach ( $collection_roots as $allowed_root ) { // If the path matches any root exactly, it is invalid. if ( $allowed_root === $path ) { return false; } // If the path is a parent path of any of the roots, it is invalid. if ( str_starts_with( $allowed_root, $path ) ) { return false; } } return true; }Introduced in 6.7.2. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp-block-metadata-registry.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.