Backport: Disable real-time collaboration when revisions are off#11734
Backport: Disable real-time collaboration when revisions are off#11734maxschmeling wants to merge 3 commits intoWordPress:trunkfrom
Conversation
Backport of Gutenberg PR WordPress/gutenberg#77502 / Trac #77499. - Add wp_revisions_are_globally_supported() and require it in wp_is_collaboration_enabled(). - Settings → Writing: notice and disabled Collaboration checkbox when WP_POST_REVISIONS disables revisions site-wide. - Bump editor and preferences script package versions to match Gutenberg build output (editor preferences UI + selector behavior). Props maxschmeling. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Co-authored-by: Cursor <cursoragent@cursor.com>
…e workflow) Co-authored-by: Cursor <cursoragent@cursor.com>
Trac Ticket MissingThis pull request is missing a link to a Trac ticket. For a contribution to be considered, there must be a corresponding ticket in Trac. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. More information about contributing to WordPress on GitHub can be found in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Summary
Backports WordPress/gutenberg#77502 for Gutenberg issue #77499.
PHP
wp_revisions_are_globally_supported()and gateswp_is_collaboration_enabled()so RTC stays off whenWP_POST_REVISIONSdisables revisions site-wide.JavaScript
Aligns editor and preferences package versions in
script-loader-packages.phpwith a current Gutenberg build (same source as the merged plugin PR: preferences modal disabled toggles + helper text;isCollaborationEnabledForCurrentPostrequires post type revision support;PreferenceBaseOptionpassesdisabledthrough).Note: Built bundles live under
src/wp-includes/js/(gitignored). After checkout, runnpm run buildin Gutenberg andnpm run gutenberg:copyfrom this repo (withgutenberg/populated per contributor docs) so localeditor.js/preferences.jsmatch these hashes, or rely on the usual Core sync workflow before merge.Tests
Adds PHPUnit coverage for
wp_revisions_are_globally_supported()and the enabled gate under default test configuration.See Gutenberg PR description for manual testing steps (
WP_POST_REVISIONS, Writing screen, editor preferences).Made with Cursor