Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/wp-admin/options-writing.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,18 @@
<tr>
<th scope="row"><?php _e( 'Collaboration' ); ?></th>
<td>
<label for="wp_collaboration_enabled">
<input name="wp_collaboration_enabled" type="checkbox" id="wp_collaboration_enabled" value="1" <?php checked( '1', (bool) get_option( 'wp_collaboration_enabled' ) ); ?> />
<?php _e( 'Enable real-time collaboration' ); ?>
</label>
<?php if ( defined ( 'FORCE_COLLABORATION_ENABLED' ) ) : ?>

Check failure on line 115 in src/wp-admin/options-writing.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

Space before opening parenthesis of function call prohibited
Copy link

@alecgeatches alecgeatches Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about inverting this to WP_DISABLE_COLLABORATION? Just so the purpose is only disabling collaboration, but if it's WP_DISABLE_COLLABORATION === false it's still up to the site administrator.

I think for a host disabling collaboration could make sense, but define( 'FORCE_COLLABORATION_ENABLED', true ); is a bit odd to force-enable it, especially if there are "feature preview" issues.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that based on feedback it's been changed to WP_ALLOW_COLLABORATION and allows for the feature to be disallowed on an environment level.

<?php if ( TRUE === FORCE_COLLABORATION_ENABLED ) : ?>

Check failure on line 116 in src/wp-admin/options-writing.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
<p class="notice notice-warning inline"><?php _e( '<strong>Note:</strong> The real-time collaboration feature preview is enabled.' ); ?></p>
<?php else : ?>
<p class="notice notice-warning inline"><?php _e( '<strong>Note:</strong> The real-time collaboration feature preview has been disabled.' ); ?></p>
<?php endif; ?>
<?php else : ?>
<label for="wp_collaboration_enabled">
<input name="wp_collaboration_enabled" type="checkbox" id="wp_collaboration_enabled" value="1" <?php checked( '1', (bool) get_option( 'wp_collaboration_enabled' ) ); ?> />
<?php _e( 'Enable real-time collaboration feature preview' ); ?>
</label>
<?php endif; ?>
</td>
</tr>
<?php
Expand Down
Loading