Skip to content

Commit 74f6ec9

Browse files
authored
Update block-bindings.php
1 parent fc845c8 commit 74f6ec9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/compat/wordpress-6.7/block-bindings.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ function gutenberg_update_meta_args_with_label( $args ) {
5656
return $args;
5757
}
5858

59+
// Don't update schema if not exposed to REST
60+
if ( ! isset( $args['show_in_rest'] ) ) {
61+
return $args;
62+
}
63+
5964
$schema = array( 'title' => $args['label'] );
60-
if ( ! empty( $args['show_in_rest'] ) && ! is_array( $args['show_in_rest'] ) ) {
65+
if ( ! is_array( $args['show_in_rest'] ) ) {
6166
$args['show_in_rest'] = array(
6267
'schema' => $schema,
6368
);

0 commit comments

Comments
 (0)