Renames the option `enable_real_time_collaboration` to `wp_enable_real_time_collaboration` to include the prefix as has been the practice for new options since WordPress 5.8.0. Props peterwilsoncc, mukesh27, parthvataliya, czarate. See #64622. Built from https://develop.svn.wordpress.org/trunk@61722 git-svn-id: http://core.svn.wordpress.org/trunk@61030 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'
|
|
);
|
|
}
|
|
}
|