Changeset 61865
- Timestamp:
- 03/07/2026 06:03:43 PM (6 days ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-includes/option.php (modified) (1 diff)
-
tests/phpunit/tests/rest-api/rest-sync-server.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r61833 r61865 2893 2893 'description' => __( 'Enable Real-Time Collaboration' ), 2894 2894 'sanitize_callback' => 'rest_sanitize_boolean', 2895 'default' => false,2895 'default' => true, 2896 2896 'show_in_rest' => true, 2897 2897 ) -
trunk/tests/phpunit/tests/rest-api/rest-sync-server.php
r61839 r61865 98 98 99 99 /** 100 * Verifies the sync route is registered when relying on the option's default 101 * value (option not stored in the database). 102 * 103 * This covers the upgrade scenario where a site has never explicitly saved 104 * the collaboration setting. 105 * 106 * @ticket 64814 107 */ 108 public function test_register_routes_with_default_option() { 109 global $wp_rest_server; 110 111 // Remove the pre_option filter added in ::set_up() so get_option() uses its default logic. 112 remove_filter( 'pre_option_wp_enable_real_time_collaboration', '__return_true' ); 113 114 // Ensure the option is not in the database. 115 delete_option( 'wp_enable_real_time_collaboration' ); 116 117 // Reset the REST server so routes are re-registered from scratch. 118 $wp_rest_server = null; 119 120 $routes = rest_get_server()->get_routes(); 121 $this->assertArrayHasKey( '/wp-sync/v1/updates', $routes ); 122 } 123 124 /** 100 125 * @doesNotPerformAssertions 101 126 */
Note: See TracChangeset
for help on using the changeset viewer.