diff --git a/lib/compat/wordpress-6.7/block-bindings.php b/lib/compat/wordpress-6.7/block-bindings.php index 70ba523ac966e..3cecb7fbc0985 100644 --- a/lib/compat/wordpress-6.7/block-bindings.php +++ b/lib/compat/wordpress-6.7/block-bindings.php @@ -56,6 +56,11 @@ function gutenberg_update_meta_args_with_label( $args ) { return $args; } + // Don't update schema if not exposed to REST + if ( ! isset( $args['show_in_rest'] ) ) { + return $args; + } + $schema = array( 'title' => $args['label'] ); if ( ! is_array( $args['show_in_rest'] ) ) { $args['show_in_rest'] = array(