Changeset 61689
- Timestamp:
- 02/19/2026 10:25:06 AM (3 weeks ago)
- Location:
- trunk
- Files:
-
- 6 added
- 12 edited
-
src/wp-admin/includes/schema.php (modified) (1 diff)
-
src/wp-admin/options-writing.php (modified) (1 diff)
-
src/wp-admin/options.php (modified) (1 diff)
-
src/wp-includes/certificates/ca-bundle.crt (modified) (3 diffs)
-
src/wp-includes/collaboration (added)
-
src/wp-includes/collaboration.php (added)
-
src/wp-includes/collaboration/class-wp-http-polling-sync-server.php (added)
-
src/wp-includes/collaboration/class-wp-sync-post-meta-storage.php (added)
-
src/wp-includes/collaboration/interface-wp-sync-storage.php (added)
-
src/wp-includes/default-filters.php (modified) (1 diff)
-
src/wp-includes/option.php (modified) (1 diff)
-
src/wp-includes/post.php (modified) (3 diffs)
-
src/wp-includes/rest-api.php (modified) (1 diff)
-
src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php (modified) (1 diff)
-
src/wp-settings.php (modified) (1 diff)
-
tests/phpunit/tests/rest-api/rest-settings-controller.php (modified) (1 diff)
-
tests/phpunit/tests/rest-api/rest-sync-server.php (added)
-
tests/qunit/fixtures/wp-api-generated.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/schema.php
r61615 r61689 564 564 // 6.9.0 565 565 'wp_notes_notify' => 1, 566 567 // 7.0.0 568 'enable_real_time_collaboration' => 1, 566 569 ); 567 570 -
trunk/src/wp-admin/options-writing.php
r60805 r61689 108 108 <?php endforeach; ?> 109 109 </select> 110 </td> 111 </tr> 112 <tr> 113 <th scope="row"><label for="enable_real_time_collaboration"><?php _e( 'Collaboration' ); ?></label></th> 114 <td> 115 <input name="enable_real_time_collaboration" type="checkbox" id="enable_real_time_collaboration" value="1" <?php checked( '1', get_option( 'enable_real_time_collaboration' ) ); ?> /> 116 <label for="enable_real_time_collaboration"><?php _e( 'Enable real-time collaboration' ); ?></label> 110 117 </td> 111 118 </tr> -
trunk/src/wp-admin/options.php
r61325 r61689 154 154 'default_link_category', 155 155 'default_post_format', 156 'enable_real_time_collaboration', 156 157 ), 157 158 ); -
trunk/src/wp-includes/certificates/ca-bundle.crt
r61685 r61689 2 2 ## Bundle of CA Root Certificates 3 3 ## 4 ## Certificate data from Mozilla as of: Tue Dec 204:12:02 2025 GMT4 ## Certificate data from Mozilla as of: Tue Nov 4 04:12:02 2025 GMT 5 5 ## 6 6 ## Find updated versions here: https://curl.se/docs/caextract.html … … 16 16 ## Just configure this file as the SSLCACertificateFile. 17 17 ## 18 ## Conversion done with mk-ca-bundle.pl version 1. 30.19 ## SHA256: a903b3cd05231e39332515ef7ebe37e697262f39515a52015c23c62805b73cd018 ## Conversion done with mk-ca-bundle.pl version 1.29. 19 ## SHA256: 039132bff5179ce57cec5803ba59fe37abe6d0297aeb538c5af27847f0702517 20 20 ## 21 21 … … 3168 3168 -----END CERTIFICATE----- 3169 3169 3170 CommScope Public Trust ECC Root-01 3171 ================================== 3172 -----BEGIN CERTIFICATE----- 3173 MIICHTCCAaOgAwIBAgIUQ3CCd89NXTTxyq4yLzf39H91oJ4wCgYIKoZIzj0EAwMwTjELMAkGA1UE 3174 BhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBUcnVz 3175 dCBFQ0MgUm9vdC0wMTAeFw0yMTA0MjgxNzM1NDNaFw00NjA0MjgxNzM1NDJaME4xCzAJBgNVBAYT 3176 AlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3Qg 3177 RUNDIFJvb3QtMDEwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARLNumuV16ocNfQj3Rid8NeeqrltqLx 3178 eP0CflfdkXmcbLlSiFS8LwS+uM32ENEp7LXQoMPwiXAZu1FlxUOcw5tjnSCDPgYLpkJEhRGnSjot 3179 6dZoL0hOUysHP029uax3OVejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G 3180 A1UdDgQWBBSOB2LAUN3GGQYARnQE9/OufXVNMDAKBggqhkjOPQQDAwNoADBlAjEAnDPfQeMjqEI2 3181 Jpc1XHvr20v4qotzVRVcrHgpD7oh2MSg2NED3W3ROT3Ek2DS43KyAjB8xX6I01D1HiXo+k515liW 3182 pDVfG2XqYZpwI7UNo5uSUm9poIyNStDuiw7LR47QjRE= 3183 -----END CERTIFICATE----- 3184 3185 CommScope Public Trust ECC Root-02 3186 ================================== 3187 -----BEGIN CERTIFICATE----- 3188 MIICHDCCAaOgAwIBAgIUKP2ZYEFHpgE6yhR7H+/5aAiDXX0wCgYIKoZIzj0EAwMwTjELMAkGA1UE 3189 BhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBUcnVz 3190 dCBFQ0MgUm9vdC0wMjAeFw0yMTA0MjgxNzQ0NTRaFw00NjA0MjgxNzQ0NTNaME4xCzAJBgNVBAYT 3191 AlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3Qg 3192 RUNDIFJvb3QtMDIwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAR4MIHoYx7l63FRD/cHB8o5mXxO1Q/M 3193 MDALj2aTPs+9xYa9+bG3tD60B8jzljHz7aRP+KNOjSkVWLjVb3/ubCK1sK9IRQq9qEmUv4RDsNuE 3194 SgMjGWdqb8FuvAY5N9GIIvejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G 3195 A1UdDgQWBBTmGHX/72DehKT1RsfeSlXjMjZ59TAKBggqhkjOPQQDAwNnADBkAjAmc0l6tqvmSfR9 3196 Uj/UQQSugEODZXW5hYA4O9Zv5JOGq4/nich/m35rChJVYaoR4HkCMHfoMXGsPHED1oQmHhS48zs7 3197 3u1Z/GtMMH9ZzkXpc2AVmkzw5l4lIhVtwodZ0LKOag== 3198 -----END CERTIFICATE----- 3199 3200 CommScope Public Trust RSA Root-01 3201 ================================== 3202 -----BEGIN CERTIFICATE----- 3203 MIIFbDCCA1SgAwIBAgIUPgNJgXUWdDGOTKvVxZAplsU5EN0wDQYJKoZIhvcNAQELBQAwTjELMAkG 3204 A1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1YmxpYyBU 3205 cnVzdCBSU0EgUm9vdC0wMTAeFw0yMTA0MjgxNjQ1NTRaFw00NjA0MjgxNjQ1NTNaME4xCzAJBgNV 3206 BAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1 3207 c3QgUlNBIFJvb3QtMDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwSGWjDR1C45Ft 3208 nYSkYZYSwu3D2iM0GXb26v1VWvZVAVMP8syMl0+5UMuzAURWlv2bKOx7dAvnQmtVzslhsuitQDy6 3209 uUEKBU8bJoWPQ7VAtYXR1HHcg0Hz9kXHgKKEUJdGzqAMxGBWBB0HW0alDrJLpA6lfO741GIDuZNq 3210 ihS4cPgugkY4Iw50x2tBt9Apo52AsH53k2NC+zSDO3OjWiE260f6GBfZumbCk6SP/F2krfxQapWs 3211 vCQz0b2If4b19bJzKo98rwjyGpg/qYFlP8GMicWWMJoKz/TUyDTtnS+8jTiGU+6Xn6myY5QXjQ/c 3212 Zip8UlF1y5mO6D1cv547KI2DAg+pn3LiLCuz3GaXAEDQpFSOm117RTYm1nJD68/A6g3czhLmfTif 3213 BSeolz7pUcZsBSjBAg/pGG3svZwG1KdJ9FQFa2ww8esD1eo9anbCyxooSU1/ZOD6K9pzg4H/kQO9 3214 lLvkuI6cMmPNn7togbGEW682v3fuHX/3SZtS7NJ3Wn2RnU3COS3kuoL4b/JOHg9O5j9ZpSPcPYeo 3215 KFgo0fEbNttPxP/hjFtyjMcmAyejOQoBqsCyMWCDIqFPEgkBEa801M/XrmLTBQe0MXXgDW1XT2mH 3216 +VepuhX2yFJtocucH+X8eKg1mp9BFM6ltM6UCBwJrVbl2rZJmkrqYxhTnCwuwwIDAQABo0IwQDAP 3217 BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUN12mmnQywsL5x6YVEFm4 3218 5P3luG0wDQYJKoZIhvcNAQELBQADggIBAK+nz97/4L1CjU3lIpbfaOp9TSp90K09FlxD533Ahuh6 3219 NWPxzIHIxgvoLlI1pKZJkGNRrDSsBTtXAOnTYtPZKdVUvhwQkZyybf5Z/Xn36lbQnmhUQo8mUuJM 3220 3y+Xpi/SB5io82BdS5pYV4jvguX6r2yBS5KPQJqTRlnLX3gWsWc+QgvfKNmwrZggvkN80V4aCRck 3221 jXtdlemrwWCrWxhkgPut4AZ9HcpZuPN4KWfGVh2vtrV0KnahP/t1MJ+UXjulYPPLXAziDslg+Mkf 3222 Foom3ecnf+slpoq9uC02EJqxWE2aaE9gVOX2RhOOiKy8IUISrcZKiX2bwdgt6ZYD9KJ0DLwAHb/W 3223 NyVntHKLr4W96ioDj8z7PEQkguIBpQtZtjSNMgsSDesnwv1B10A8ckYpwIzqug/xBpMu95yo9GA+ 3224 o/E4Xo4TwbM6l4c/ksp4qRyv0LAbJh6+cOx69TOY6lz/KwsETkPdY34Op054A5U+1C0wlREQKC6/ 3225 oAI+/15Z0wUOlV9TRe9rh9VIzRamloPh37MG88EU26fsHItdkJANclHnYfkUyq+Dj7+vsQpZXdxc 3226 1+SWrVtgHdqul7I52Qb1dgAT+GhMIbA1xNxVssnBQVocicCMb3SgazNNtQEo/a2tiRc7ppqEvOuM 3227 6sRxJKi6KfkIsidWNTJf6jn7MZrVGczw 3228 -----END CERTIFICATE----- 3229 3230 CommScope Public Trust RSA Root-02 3231 ================================== 3232 -----BEGIN CERTIFICATE----- 3233 MIIFbDCCA1SgAwIBAgIUVBa/O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8EGRPbmz6UNp2YINIos8wIDAQABo0IwQDAP 3247 BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUR9DnsSL/nSz12Vdgs7Gx 3248 cJXvYXowDQYJKoZIhvcNAQELBQADggIBAIZpsU0v6Z9PIpNojuQhmaPORVMbc0RTAIFhzTHjCLqB 3249 KCh6krm2qMhDnscTJk3C2OVVnJJdUNjCK9v+5qiXz1I6JMNlZFxHMaNlNRPDk7n3+VGXu6TwYofF 3250 1gbTl4MgqX67tiHCpQ2EAOHyJxCDut0DgdXdaMNmEMjRdrSzbymeAPnCKfWxkxlSaRosTKCL4BWa 3251 MS/TiJVZbuXEs1DIFAhKm4sTg7GkcrI7djNB3NyqpgdvHSQSn8h2vS/ZjvQs7rfSOBAkNlEv41xd 3252 gSGn2rtO/+YHqP65DSdsu3BaVXoT6fEqSWnHX4dXTEN5bTpl6TBcQe7rd6VzEojov32u5cSoHw2O 3253 HG1QAk8mGEPej1WFsQs3BWDJVTkSBKEqz3EWnzZRSb9wO55nnPt7eck5HHisd5FUmrh1CoFSl+Nm 3254 YWvtPjgelmFV4ZFUjO2MJB+ByRCac5krFk5yAD9UG/iNuovnFNa2RU9g7Jauwy8CTl2dlklyALKr 3255 dVwPaFsdZcJfMw8eD/A7hvWwTruc9+olBdytoptLFwG+Qt81IR2tq670v64fG9PiO/yzcnMcmyiQ 3256 iRM9HcEARwmWmjgb3bHPDcK0RPOWlc4yOo80nOAXx17Org3bhzjlP1v9mxnhMUF6cKojawHhRUzN 3257 lM47ni3niAIi9G7oyOzWPPO5std3eqx7 3258 -----END CERTIFICATE----- 3259 3170 3260 Telekom Security TLS ECC Root 2020 3171 3261 ================================== -
trunk/src/wp-includes/default-filters.php
r61661 r61689 787 787 add_action( 'init', '_wp_register_default_font_collections' ); 788 788 789 // Collaboration. 790 add_action( 'admin_init', 'wp_collaboration_inject_setting' ); 791 789 792 // Add ignoredHookedBlocks metadata attribute to the template and template part post types. 790 793 add_filter( 'rest_pre_insert_wp_template', 'inject_ignored_hooked_blocks_metadata_attributes' ); -
trunk/src/wp-includes/option.php
r61600 r61689 2899 2899 2900 2900 register_setting( 2901 'writing', 2902 'enable_real_time_collaboration', 2903 array( 2904 'type' => 'boolean', 2905 'description' => __( 'Enable Real-Time Collaboration' ), 2906 'sanitize_callback' => 'rest_sanitize_boolean', 2907 'default' => true, 2908 'show_in_rest' => true, 2909 ) 2910 ); 2911 2912 register_setting( 2901 2913 'reading', 2902 2914 'posts_per_page', -
trunk/src/wp-includes/post.php
r61649 r61689 657 657 ) 658 658 ); 659 660 if ( get_option( 'enable_real_time_collaboration' ) ) { 661 register_post_type( 662 'wp_sync_storage', 663 array( 664 'labels' => array( 665 'name' => __( 'Sync Updates' ), 666 'singular_name' => __( 'Sync Update' ), 667 ), 668 'public' => false, 669 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 670 'hierarchical' => false, 671 'capabilities' => array( 672 'read' => 'do_not_allow', 673 'read_private_posts' => 'do_not_allow', 674 'create_posts' => 'do_not_allow', 675 'publish_posts' => 'do_not_allow', 676 'edit_posts' => 'do_not_allow', 677 'edit_others_posts' => 'do_not_allow', 678 'edit_published_posts' => 'do_not_allow', 679 'delete_posts' => 'do_not_allow', 680 'delete_others_posts' => 'do_not_allow', 681 'delete_published_posts' => 'do_not_allow', 682 ), 683 'map_meta_cap' => false, 684 'publicly_queryable' => false, 685 'query_var' => false, 686 'rewrite' => false, 687 'show_in_menu' => false, 688 'show_in_rest' => false, 689 'show_ui' => false, 690 'supports' => array( 'custom-fields' ), 691 ) 692 ); 693 } 659 694 660 695 register_post_status( … … 8612 8647 * 8613 8648 * @since 6.3.0 Adds `wp_pattern_sync_status` meta field to the wp_block post type so an unsynced option can be added. 8649 * @since 7.0.0 Adds `_crdt_document` meta field to post types so that CRDT documents can be persisted. 8614 8650 * 8615 8651 * @link https://github.com/WordPress/gutenberg/pull/51144 … … 8631 8667 ) 8632 8668 ); 8633 } 8669 8670 if ( get_option( 'enable_real_time_collaboration' ) ) { 8671 register_meta( 8672 'post', 8673 '_crdt_document', 8674 array( 8675 'auth_callback' => static function ( bool $_allowed, string $_meta_key, int $object_id, int $user_id ): bool { 8676 return user_can( $user_id, 'edit_post', $object_id ); 8677 }, 8678 /* 8679 * Revisions must be disabled because we always want to preserve 8680 * the latest persisted CRDT document, even when a revision is restored. 8681 * This ensures that we can continue to apply updates to a shared document 8682 * and peers can simply merge the restored revision like any other incoming 8683 * update. 8684 * 8685 * If we want to persist CRDT documents alongside revisions in the 8686 * future, we should do so in a separate meta key. 8687 */ 8688 'revisions_enabled' => false, 8689 'show_in_rest' => true, 8690 'single' => true, 8691 'type' => 'string', 8692 ) 8693 ); 8694 } 8695 } -
trunk/src/wp-includes/rest-api.php
r61674 r61689 429 429 $icons_controller = new WP_REST_Icons_Controller(); 430 430 $icons_controller->register_routes(); 431 432 // Collaboration. 433 if ( get_option( 'enable_real_time_collaboration' ) ) { 434 $sync_storage = new WP_Sync_Post_Meta_Storage(); 435 $sync_server = new WP_HTTP_Polling_Sync_Server( $sync_storage ); 436 $sync_server->register_routes(); 437 } 431 438 } 432 439 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php
r61429 r61689 233 233 $is_draft = 'draft' === $post->post_status || 'auto-draft' === $post->post_status; 234 234 235 if ( $is_draft && (int) $post->post_author === $user_id && ! $post_lock ) { 235 /* 236 * In the context of real-time collaboration, all peers are effectively 237 * authors and we don't want to vary behavior based on whether they are the 238 * original author. Always target an autosave revision. 239 * 240 * This avoids the following issue when real-time collaboration is enabled: 241 * 242 * - Autosaves from the original author (if they have the post lock) will 243 * target the saved post. 244 * 245 * - Autosaves from other users are applied to a post revision. 246 * 247 * - If any user reloads a post, they load changes from the author's autosave. 248 * 249 * - The saved post has now diverged from the persisted CRDT document. The 250 * content (and/or title or excerpt) are now "ahead" of the persisted CRDT 251 * document. 252 * 253 * - When the persisted CRDT document is loaded, a diff is computed against 254 * the saved post. This diff is then applied to the in-memory CRDT 255 * document, which can lead to duplicate inserts or deletions. 256 */ 257 $is_collaboration_enabled = get_option( 'enable_real_time_collaboration' ); 258 259 if ( $is_draft && (int) $post->post_author === $user_id && ! $post_lock && ! $is_collaboration_enabled ) { 236 260 /* 237 261 * Draft posts for the same author: autosaving updates the post and does not create a revision. -
trunk/src/wp-settings.php
r61678 r61689 301 301 require ABSPATH . WPINC . '/abilities-api.php'; 302 302 require ABSPATH . WPINC . '/abilities.php'; 303 require ABSPATH . WPINC . '/collaboration/interface-wp-sync-storage.php'; 304 require ABSPATH . WPINC . '/collaboration/class-wp-sync-post-meta-storage.php'; 305 require ABSPATH . WPINC . '/collaboration/class-wp-http-polling-sync-server.php'; 306 require ABSPATH . WPINC . '/collaboration.php'; 303 307 require ABSPATH . WPINC . '/rest-api.php'; 304 308 require ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php'; -
trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php
r61324 r61689 120 120 'default_comment_status', 121 121 'site_icon', // Registered in wp-includes/blocks/site-logo.php 122 'enable_real_time_collaboration', 122 123 ); 123 124 -
trunk/tests/qunit/fixtures/wp-api-generated.js
r61674 r61689 11086 11086 "required": false 11087 11087 }, 11088 "enable_real_time_collaboration": { 11089 "title": "", 11090 "description": "Enable Real-Time Collaboration", 11091 "type": "boolean", 11092 "required": false 11093 }, 11088 11094 "posts_per_page": { 11089 11095 "title": "Maximum posts per page", … … 14547 14553 "default_category": 1, 14548 14554 "default_post_format": "0", 14555 "enable_real_time_collaboration": true, 14549 14556 "posts_per_page": 10, 14550 14557 "show_on_front": "posts",
Note: See TracChangeset
for help on using the changeset viewer.