Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/wp-admin/includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -2429,10 +2429,17 @@ function the_block_editor_meta_boxes() {
continue;
}

$meta_boxes_per_location[ $location ][] = array(
$meta_box_entry = array(
'id' => $meta_box['id'],
'title' => $meta_box['title'],
);

// Mark meta boxes compatible with real-time collaboration.
if ( ! empty( $meta_box['args']['__rtc_compatible_meta_box'] ) ) {
$meta_box_entry['__rtc_compatible'] = true;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also keep the old code and always pass the boolean value. On the client, missing __rtc_compatible is evaluated as false.

What do you think?

'__rtc_compatible' => ! empty( $meta_box['args']['__rtc_compatible_meta_box'] )

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me! Simplified in 5592160.


$meta_boxes_per_location[ $location ][] = $meta_box_entry;
}
}
}
Expand Down
Loading