Skip to content

Backport: Disable real-time collaboration when revisions are off#11734

Open
maxschmeling wants to merge 3 commits intoWordPress:trunkfrom
maxschmeling:backport/77499-rtc-disable-when-revisions-off
Open

Backport: Disable real-time collaboration when revisions are off#11734
maxschmeling wants to merge 3 commits intoWordPress:trunkfrom
maxschmeling:backport/77499-rtc-disable-when-revisions-off

Conversation

@maxschmeling
Copy link
Copy Markdown

Summary

Backports WordPress/gutenberg#77502 for Gutenberg issue #77499.

PHP

  • Introduces wp_revisions_are_globally_supported() and gates wp_is_collaboration_enabled() so RTC stays off when WP_POST_REVISIONS disables revisions site-wide.
  • Settings → Writing: inline notice and disabled Collaboration checkbox when revisions are globally unavailable.

JavaScript

Aligns editor and preferences package versions in script-loader-packages.php with a current Gutenberg build (same source as the merged plugin PR: preferences modal disabled toggles + helper text; isCollaborationEnabledForCurrentPost requires post type revision support; PreferenceBaseOption passes disabled through).

Note: Built bundles live under src/wp-includes/js/ (gitignored). After checkout, run npm run build in Gutenberg and npm run gutenberg:copy from this repo (with gutenberg/ populated per contributor docs) so local editor.js / preferences.js match 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

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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props maxschmeling.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

maxschmeling and others added 2 commits May 6, 2026 13:56
Co-authored-by: Cursor <cursoragent@cursor.com>
…e workflow)

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Trac Ticket Missing

This 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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant