Skip to content

RTC: [Interface] Allow limiting Real-Time Collaboration to specific post statuses #77431

@smithjw1

Description

@smithjw1

What problem does this address?

Similar to #75072, it is currently difficult for sites with strict standards on published content to adopt real-time collaboration safely. Real-time collaboration is an all-or-nothing feature.

Since changes to published content are immediately available, it is more likely that unintended content becomes publicly available during editing.

What is your proposed solution?

A pre-publish panel that temporarily locks all other users out of making changes when a user clicks to Publish a draft post, or "Save" a published post.

The user initiating the action can still make edits, but all other users are either put into a read-only mode (that would have to be built) or directed back to the post list.

Alternatively, we could provide a mechanism for developers to opt specific post statuses out of real-time collaboration. RTC would remain enabled by default for all post statuses, but developers could disable it where needed.

A filter hook would offer the most flexibility:

add_filter( 'gutenberg_rtc_enabled_for_post_status', function( $enabled, $post_status ) {
// Disable RTC for the 'publishd' post status
if ( 'published' === $post_status ) {
return false;
}
return $enabled;
}, 10, 2 );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions