From 30414941170b162be62834ab7d54eda1cfd2447a Mon Sep 17 00:00:00 2001 From: Alec Geatches Date: Thu, 19 Mar 2026 14:59:26 -0600 Subject: [PATCH 1/6] Add WP_DISABLE_COLLABORATION constant and wrapper wp_is_collaboration_enabled() function --- src/wp-admin/options-writing.php | 12 ++++++++--- src/wp-includes/collaboration.php | 21 ++++++++++++++++++- src/wp-includes/post.php | 4 ++-- src/wp-includes/rest-api.php | 2 +- .../class-wp-rest-autosaves-controller.php | 2 +- 5 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php index 1943f42176714..e60f88f3d630e 100644 --- a/src/wp-admin/options-writing.php +++ b/src/wp-admin/options-writing.php @@ -110,10 +110,16 @@ - + - /> - + +

Note: Real-time collaboration has been disabled.' ); ?>

+ + + register_routes(); // Collaboration. - if ( get_option( 'enable_real_time_collaboration' ) ) { + if ( wp_is_collaboration_enabled() ) { $sync_storage = new WP_Sync_Post_Meta_Storage(); $sync_server = new WP_HTTP_Polling_Sync_Server( $sync_storage ); $sync_server->register_routes(); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php index b47a614c873d6..6e4d8a1f92b1e 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php @@ -254,7 +254,7 @@ public function create_item( $request ) { * the saved post. This diff is then applied to the in-memory CRDT * document, which can lead to duplicate inserts or deletions. */ - $is_collaboration_enabled = get_option( 'enable_real_time_collaboration' ); + $is_collaboration_enabled = wp_is_collaboration_enabled(); if ( $is_draft && (int) $post->post_author === $user_id && ! $post_lock && ! $is_collaboration_enabled ) { /* From 7d114c81b167d9c7674dbff80e0048b3245a6828 Mon Sep 17 00:00:00 2001 From: Alec Geatches Date: Thu, 19 Mar 2026 15:06:59 -0600 Subject: [PATCH 2/6] Use `wp_collaboration_enabled` instead of old flag `enable_real_time_collaboration` --- src/wp-includes/collaboration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/collaboration.php b/src/wp-includes/collaboration.php index 392c357e18220..a59f7b79567f4 100644 --- a/src/wp-includes/collaboration.php +++ b/src/wp-includes/collaboration.php @@ -11,7 +11,7 @@ * * If the WP_DISABLE_COLLABORATION constant is defined and true, * collaboration is always disabled regardless of the database option. - * Otherwise, falls back to the 'enable_real_time_collaboration' option. + * Otherwise, falls back to the 'wp_collaboration_enabled' option. * * @since 7.0.0 * @@ -22,7 +22,7 @@ function wp_is_collaboration_enabled() { return false; } - return (bool) get_option( 'enable_real_time_collaboration' ); + return (bool) get_option( 'wp_collaboration_enabled' ); } /** From c77ced1dd623296d44bfb3fb4a6acdbf8c37faa3 Mon Sep 17 00:00:00 2001 From: ingeniumed Date: Fri, 20 Mar 2026 14:15:35 +1100 Subject: [PATCH 3/6] Switch the constant to be a positive intent based on feedback --- src/wp-admin/options-writing.php | 2 +- src/wp-includes/collaboration.php | 4 ++-- src/wp-includes/default-constants.php | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/options-writing.php b/src/wp-admin/options-writing.php index 3e6b3548adc0c..91265f700dc75 100644 --- a/src/wp-admin/options-writing.php +++ b/src/wp-admin/options-writing.php @@ -112,7 +112,7 @@ - +

Note: Real-time collaboration has been disabled.' ); ?>