diff --git a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php index e893c305e20d9..1ba51f40bc9c4 100644 --- a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php +++ b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php @@ -15,7 +15,6 @@ * @access private */ class WP_Theme_JSON_6_1 extends WP_Theme_JSON_6_0 { - /** * Define which defines which pseudo selectors are enabled for * which elements. diff --git a/lib/experimental/class-wp-theme-json-gutenberg.php b/lib/experimental/class-wp-theme-json-gutenberg.php index 3d6bf949e7f83..53809cb692aa6 100644 --- a/lib/experimental/class-wp-theme-json-gutenberg.php +++ b/lib/experimental/class-wp-theme-json-gutenberg.php @@ -15,5 +15,17 @@ * @access private */ class WP_Theme_JSON_Gutenberg extends WP_Theme_JSON_6_1 { - + /** + * Holds block metadata extracted from block.json + * to be shared among all instances so we don't + * process it twice. + * + * It is necessary to redefine $blocks_metadata here so that it + * doesn't get inherited from an earlier instantiation of the + * parent class. + * + * @since 5.8.0 + * @var array + */ + protected static $blocks_metadata = null; }