Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://develop.svn.wordpress.org/trunk"
},
"gutenberg": {
"ref": "59a08c5496008ca88f4b6b86f38838c3612d88c8"
"ref": "2ab68995bfe6f038d0d0851ad2023007d04730f7"
},
"engines": {
"node": ">=20.10.0",
Expand Down
3 changes: 3 additions & 0 deletions src/wp-admin/includes/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,9 @@ function populate_options( array $options = array() ) {

// 6.9.0
'wp_notes_notify' => 1,

// 7.0.0
'enable_real_time_collaboration' => 0,
);

// 3.3.0
Expand Down
7 changes: 7 additions & 0 deletions src/wp-admin/options-writing.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="enable_real_time_collaboration"><?php _e( 'Collaboration' ); ?></label></th>
<td>
<input name="enable_real_time_collaboration" type="checkbox" id="enable_real_time_collaboration" value="1" <?php checked( '1', get_option( 'enable_real_time_collaboration' ) ); ?> />
<?php _e( 'Enable real-time collaboration' ); ?></label>
</td>
</tr>
<?php
if ( get_option( 'link_manager_enabled' ) ) :
?>
Expand Down
1 change: 1 addition & 0 deletions src/wp-admin/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
'default_email_category',
'default_link_category',
'default_post_format',
'enable_real_time_collaboration',
),
);
$allowed_options['misc'] = array();
Expand Down
24 changes: 24 additions & 0 deletions src/wp-includes/collaboration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* Bootstraps collaborative editing.
*
* @package WordPress
* @since 7.0.0
*/

/**
* Injects the real-time collaboration setting into a global variable.
*
* @since 6.8.0
*
* @access private
*/
function wp_collaboration_inject_setting() {
if ( get_option( 'enable_real_time_collaboration' ) ) {
wp_add_inline_script(
'wp-core-data',
'window._wpCollaborationEnabled = true;',
'after'
);
}
}
Loading
Loading