Make WordPress Core


Ignore:
Timestamp:
03/20/2026 03:25:02 PM (3 months ago)
Author:
ellatrix
Message:

Real-time collaboration: Add WP_ALLOW_COLLABORATION constant.

This provides an easy way at config level to disable real-time collaboration.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11311.

See #64904.
Props alecgeatches, ingeniumed, zieladam, peterwilsoncc, tyxla.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-writing.php

    r62058 r62075  
    113113<th scope="row"><?php _e( 'Collaboration' ); ?></th>
    114114<td>
    115     <label for="wp_collaboration_enabled">
    116         <input name="wp_collaboration_enabled" type="checkbox" id="wp_collaboration_enabled" value="1" <?php checked( '1', (bool) get_option( 'wp_collaboration_enabled' ) ); ?> />
    117         <?php _e( 'Enable real-time collaboration' ); ?>
    118     </label>
     115    <?php if ( ! defined( 'WP_ALLOW_COLLABORATION' ) || true === WP_ALLOW_COLLABORATION ) : ?>
     116        <div class="notice notice-warning inline">
     117            <p><?php _e( '<strong>Note:</strong> Real-time collaboration has been disabled.' ); ?></p>
     118        </div>
     119    <?php else : ?>
     120        <label for="wp_collaboration_enabled">
     121            <input name="wp_collaboration_enabled" type="checkbox" id="wp_collaboration_enabled" value="1" <?php checked( '1', (bool) get_option( 'wp_collaboration_enabled' ) ); ?> />
     122            <?php _e( 'Enable real-time collaboration' ); ?>
     123        </label>
     124    <?php endif; ?>
    119125</td>
    120126</tr>
Note: See TracChangeset for help on using the changeset viewer.