Make WordPress Core


Ignore:
Timestamp:
03/04/2026 08:04:35 PM (6 months ago)
Author:
ellatrix
Message:

Real-time collaboration: enable by default.

The option name is changed since the previous option name set a default value during database initialization. A default is no longer needed since the default is false.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11159.

Fixes #64622.
Props czarate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-autosaves-controller.php

    r61722 r61828  
    571571
    572572        public function test_rest_autosave_draft_post_same_author() {
    573                 $original_option = get_option( 'wp_enable_real_time_collaboration' );
    574                 update_option( 'wp_enable_real_time_collaboration', false );
     573                add_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_true' );
    575574
    576575                wp_set_current_user( self::$editor_id );
     
    608607
    609608                wp_delete_post( $post_id );
    610                 update_option( 'wp_enable_real_time_collaboration', $original_option );
     609                remove_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_true' );
    611610        }
    612611
     
    749748
    750749        public function test_update_item_draft_page_with_parent() {
    751                 $original_option = get_option( 'wp_enable_real_time_collaboration' );
    752                 update_option( 'wp_enable_real_time_collaboration', false );
     750                add_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_true' );
    753751
    754752                wp_set_current_user( self::$editor_id );
     
    769767                $this->assertSame( self::$child_draft_page_id, $data['id'] );
    770768                $this->assertSame( self::$parent_page_id, $data['parent'] );
    771                 update_option( 'wp_enable_real_time_collaboration', $original_option );
     769
     770                remove_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_true' );
    772771        }
    773772
     
    935934         */
    936935        public function test_rest_autosave_draft_post_same_author_with_rtc() {
    937                 $original_option = get_option( 'wp_enable_real_time_collaboration' );
    938                 update_option( 'wp_enable_real_time_collaboration', true );
     936                add_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_false' );
    939937
    940938                wp_set_current_user( self::$editor_id );
     
    975973
    976974                wp_delete_post( $post_id );
    977                 update_option( 'wp_enable_real_time_collaboration', $original_option );
     975                remove_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_false' );
    978976        }
    979977
     
    983981         */
    984982        public function test_update_item_draft_page_with_parent_with_rtc() {
    985                 $original_option = get_option( 'wp_enable_real_time_collaboration' );
    986                 update_option( 'wp_enable_real_time_collaboration', true );
     983                add_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_false' );
    987984
    988985                wp_set_current_user( self::$editor_id );
     
    10041001                $this->assertNotSame( self::$child_draft_page_id, $data['id'] );
    10051002                $this->assertSame( self::$child_draft_page_id, $data['parent'] );
    1006                 update_option( 'wp_enable_real_time_collaboration', $original_option );
     1003
     1004                remove_filter( 'pre_option_wp_disable_real_time_collaboration', '__return_false' );
    10071005        }
    10081006}
Note: See TracChangeset for help on using the changeset viewer.