Make WordPress Core


Ignore:
Timestamp:
03/05/2026 12:27:39 AM (7 months ago)
Author:
peterwilsoncc
Message:

Real-time collaboration: Rename option for positive intent.

This reverts the real time collaboration option name back to wp_enable_real_time_collaboration to avoid the need to turn on a checkbox in order to turn off the feature. This is to reduce the cognitive load on both users and developers of an on is off paradigm.

To ensure Real Time Collaboration is enabled prior to the upgrade routine running on multi-site installs, the option default is filtered on the default_option_wp_enable_real_time_collaboration hook to enable the option by default.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/11161
Follow up to r61828.

Props peterwilsoncc, czarate, sergeybiryukov.
Fixes #64622.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-sync-server.php

    r61828 r61833  
    1515
    1616        public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
    17                 add_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_false' );
    18 
    1917                self::$editor_id     = $factory->user->create( array( 'role' => 'editor' ) );
    2018                self::$subscriber_id = $factory->user->create( array( 'role' => 'subscriber' ) );
    … …  
    2624                self::delete_user( self::$subscriber_id );
    2725                wp_delete_post( self::$post_id, true );
    28                 remove_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_false' );
    2926        }
    3027
    3128        public function set_up() {
    3229                parent::set_up();
     30
     31                // Enable option for tests.
     32                add_filter( 'pre_option_wp_enable_real_time_collaboration', '__return_true' );
    3333
    3434                // Reset storage post ID cache to ensure clean state after transaction rollback.
Note: See TracChangeset for help on using the changeset viewer.