This reverts the real time collaboration option name back to `wp_enable_real_time_collaboration` to avoid the need to turn on a checkbox in order to turn off the feature. This is to reduce the cognitive load on both users and developers of an on is off paradigm. To ensure Real Time Collaboration is enabled prior to the upgrade routine running on multi-site installs, the option default is filtered on the `default_option_wp_enable_real_time_collaboration` hook to enable the option by default. Developed in: https://github.com/WordPress/wordpress-develop/pull/11161 Follow up to r61828. Props peterwilsoncc, czarate, sergeybiryukov. Fixes #64622. Built from https://develop.svn.wordpress.org/trunk@61833 git-svn-id: http://core.svn.wordpress.org/trunk@61120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
25 lines
427 B
PHP
25 lines
427 B
PHP
<?php
|
|
/**
|
|
* Bootstraps collaborative editing.
|
|
*
|
|
* @package WordPress
|
|
* @since 7.0.0
|
|
*/
|
|
|
|
/**
|
|
* Injects the real-time collaboration setting into a global variable.
|
|
*
|
|
* @since 7.0.0
|
|
*
|
|
* @access private
|
|
*/
|
|
function wp_collaboration_inject_setting() {
|
|
if ( get_option( 'wp_enable_real_time_collaboration' ) ) {
|
|
wp_add_inline_script(
|
|
'wp-core-data',
|
|
'window._wpCollaborationEnabled = true;',
|
|
'after'
|
|
);
|
|
}
|
|
}
|