diff --git a/lib/compat/wordpress-7.1/rest-api.php b/lib/compat/wordpress-7.1/rest-api.php index 97ae142ff5745a..2362b086e06ec7 100644 --- a/lib/compat/wordpress-7.1/rest-api.php +++ b/lib/compat/wordpress-7.1/rest-api.php @@ -73,27 +73,3 @@ function gutenberg_override_attachments_rest_controller( $args, $post_type ) { return $args; } add_filter( 'register_post_type_args', 'gutenberg_override_attachments_rest_controller', 10, 2 ); - -/** - * Overrides the default REST controller for autosaves to fix real-time - * collaboration on draft posts. - * - * When RTC is enabled, draft autosaves from all users update the post directly - * instead of creating per-user autosave revisions depending on post lock and - * assigned author. - * - * Only overrides when autosave_rest_controller_class is not explicitly set, - * i.e. when WP_REST_Autosaves_Controller would be used by default. Post types - * with their own specialized autosave controller (e.g. templates) are left alone. - * - * @param array $args Array of arguments for registering a post type. - * @return array Modified array of arguments. - */ -function gutenberg_override_autosaves_rest_controller( $args ) { - if ( empty( $args['autosave_rest_controller_class'] ) ) { - $args['autosave_rest_controller_class'] = 'Gutenberg_REST_Autosaves_Controller'; - } - return $args; -} - -add_filter( 'register_post_type_args', 'gutenberg_override_autosaves_rest_controller', 10, 1 ); diff --git a/lib/compat/wordpress-7.1/class-gutenberg-rest-autosaves-controller.php b/lib/experimental/collaboration/class-gutenberg-rest-autosaves-controller.php similarity index 100% rename from lib/compat/wordpress-7.1/class-gutenberg-rest-autosaves-controller.php rename to lib/experimental/collaboration/class-gutenberg-rest-autosaves-controller.php diff --git a/lib/compat/wordpress-7.1/class-wp-http-polling-sync-server.php b/lib/experimental/collaboration/class-wp-http-polling-sync-server.php similarity index 100% rename from lib/compat/wordpress-7.1/class-wp-http-polling-sync-server.php rename to lib/experimental/collaboration/class-wp-http-polling-sync-server.php diff --git a/lib/compat/wordpress-7.1/class-wp-sync-config.php b/lib/experimental/collaboration/class-wp-sync-config.php similarity index 100% rename from lib/compat/wordpress-7.1/class-wp-sync-config.php rename to lib/experimental/collaboration/class-wp-sync-config.php diff --git a/lib/compat/wordpress-7.1/class-wp-sync-post-meta-storage.php b/lib/experimental/collaboration/class-wp-sync-post-meta-storage.php similarity index 100% rename from lib/compat/wordpress-7.1/class-wp-sync-post-meta-storage.php rename to lib/experimental/collaboration/class-wp-sync-post-meta-storage.php diff --git a/lib/compat/wordpress-7.1/class-wp-sync-save-server.php b/lib/experimental/collaboration/class-wp-sync-save-server.php similarity index 100% rename from lib/compat/wordpress-7.1/class-wp-sync-save-server.php rename to lib/experimental/collaboration/class-wp-sync-save-server.php diff --git a/lib/compat/wordpress-7.1/collaboration.php b/lib/experimental/collaboration/collaboration.php similarity index 99% rename from lib/compat/wordpress-7.1/collaboration.php rename to lib/experimental/collaboration/collaboration.php index b2c36781394808..14481554c5d9bd 100644 --- a/lib/compat/wordpress-7.1/collaboration.php +++ b/lib/experimental/collaboration/collaboration.php @@ -580,8 +580,8 @@ function gutenberg_post_list_collaboration_row_actions( $actions, $post ) { . '%5$s', esc_url( get_edit_post_link( $post->ID ) ), /* translators: %s: Post title. */ - esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ), - __( 'Edit' ), + esc_attr( sprintf( __( 'Edit “%s”', 'default' ), $title ) ), + __( 'Edit', 'default' ), /* translators: %s: Post title. */ esc_attr( sprintf( __( 'Join editing “%s”', 'gutenberg' ), $title ) ), /* translators: Action link text for a singular post in the post list. Can be any type of post. */ diff --git a/lib/compat/wordpress-7.1/interface-wp-sync-storage.php b/lib/experimental/collaboration/interface-wp-sync-storage.php similarity index 100% rename from lib/compat/wordpress-7.1/interface-wp-sync-storage.php rename to lib/experimental/collaboration/interface-wp-sync-storage.php diff --git a/lib/compat/wordpress-7.1/meta-box-rtc-compat.php b/lib/experimental/collaboration/meta-box-rtc-compat.php similarity index 100% rename from lib/compat/wordpress-7.1/meta-box-rtc-compat.php rename to lib/experimental/collaboration/meta-box-rtc-compat.php diff --git a/lib/experimental/collaboration/rest-api.php b/lib/experimental/collaboration/rest-api.php new file mode 100644 index 00000000000000..b22157dea26857 --- /dev/null +++ b/lib/experimental/collaboration/rest-api.php @@ -0,0 +1,30 @@ +