From 1e7a871a0697bc6733d3cf6ae941c2af0e8367b6 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 23 Jan 2025 11:58:21 +0400 Subject: [PATCH] Inline Commenting: Change the PHP compat directory --- .../wordpress-6.8 => experimental}/block-comments.php | 0 .../class-gutenberg-rest-comment-controller.php} | 4 ++-- lib/load.php | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) rename lib/{compat/wordpress-6.8 => experimental}/block-comments.php (100%) rename lib/{compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php => experimental/class-gutenberg-rest-comment-controller.php} (96%) diff --git a/lib/compat/wordpress-6.8/block-comments.php b/lib/experimental/block-comments.php similarity index 100% rename from lib/compat/wordpress-6.8/block-comments.php rename to lib/experimental/block-comments.php diff --git a/lib/compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php b/lib/experimental/class-gutenberg-rest-comment-controller.php similarity index 96% rename from lib/compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php rename to lib/experimental/class-gutenberg-rest-comment-controller.php index 60b45b1a63adef..004552d2047b65 100644 --- a/lib/compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php +++ b/lib/experimental/class-gutenberg-rest-comment-controller.php @@ -7,7 +7,7 @@ */ // Create a new class that extends WP_REST_Comments_Controller -class Gutenberg_REST_Comment_Controller_6_8 extends WP_REST_Comments_Controller { +class Gutenberg_REST_Comment_Controller extends WP_REST_Comments_Controller { public function create_item_permissions_check( $request ) { if ( empty( $request['comment_type'] ) || 'comment' === $request['comment_type'] ) { @@ -117,7 +117,7 @@ public function create_item_permissions_check( $request ) { add_action( 'rest_api_init', function () { - $controller = new Gutenberg_REST_Comment_Controller_6_8(); + $controller = new Gutenberg_REST_Comment_Controller(); $controller->register_routes(); } ); diff --git a/lib/load.php b/lib/load.php index 69ba59e3718842..4ea7903397510e 100644 --- a/lib/load.php +++ b/lib/load.php @@ -42,8 +42,6 @@ function gutenberg_is_experiment_enabled( $name ) { require __DIR__ . '/compat/wordpress-6.7/rest-api.php'; // WordPress 6.8 compat. - require __DIR__ . '/compat/wordpress-6.8/block-comments.php'; - require __DIR__ . '/compat/wordpress-6.8/class-gutenberg-rest-comment-controller-6-8.php'; require __DIR__ . '/compat/wordpress-6.8/class-gutenberg-hierarchical-sort.php'; require __DIR__ . '/compat/wordpress-6.8/rest-api.php'; @@ -54,6 +52,10 @@ function gutenberg_is_experiment_enabled( $name ) { require_once __DIR__ . '/experimental/rest-api.php'; require_once __DIR__ . '/experimental/kses-allowed-html.php'; + + // Block Comments. + require __DIR__ . '/experimental/block-comments.php'; + require __DIR__ . '/experimental/class-gutenberg-rest-comment-controller.php'; } // Experimental signaling server.