Add backport for WP_ALLOW_COLLABORATION#76716
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Noting that this work was originally done by @alecgeatches so he's looped in as well 🙏🏾 |
1036387 to
76c8a00
Compare
|
Flaky tests detected in edfbfe2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23510208424
|
76c8a00 to
304a34a
Compare
lib/load.php
Outdated
| } | ||
|
|
||
| // Gutenberg should have RTC enabled by default, unlike in core. | ||
| if ( ! defined( 'WP_ALLOW_COLLABORATION' ) ) { |
There was a problem hiding this comment.
If there's a better place to do this, let me know.
This will get overriden if someone defines this for their site or in their wp-config.php.
There was a problem hiding this comment.
Let's keep it in collaboration.php. Also it needs to be updated to match trunk:
There was a problem hiding this comment.
WordPress/wordpress-develop#11333 (review)
Looks like this will be what'll be ported then.
Noting that part of my comment was confirming how much of the constant is to be ported (given RTC is enabled here and not in core) so this clarifies it.
There was a problem hiding this comment.
Updated to match the logic above by @adamziel
|
Core's Implementation
Gutenberg's Implementation with this PR
I had three Qs in my mind for Gutenberg's implementation that came to mind:
|
07aed26 to
28d57e3
Compare
* Add the backport for the WP PR * Add in the backprot link * Port over the missing notices and ensure WP_ALLOW_COLLABORATION is set to true * Fix the formatting * Change the default to true * Move the constant setting code to collaboration.php * CR feedback * fix the php formatting Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org> Co-authored-by: chriszarate <czarate@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>
* Add the backport for the WP PR * Add in the backprot link * Port over the missing notices and ensure WP_ALLOW_COLLABORATION is set to true * Fix the formatting * Change the default to true * Move the constant setting code to collaboration.php * CR feedback * fix the php formatting Co-authored-by: ingeniumed <ingeniumed@git.wordpress.org> Co-authored-by: chriszarate <czarate@git.wordpress.org> Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org>

What?
Backport WP_ALLOW_COLLABORATION constant from WordPress/wordpress-develop#11311
Why?
This will allow collaboration to be disallowed at an environment level, or individually using a constant.
Backport PR for WordPress/wordpress-develop#11311