Skip to content

Commit

Permalink
Inline Commenting: Change the PHP compat directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Jan 23, 2025
1 parent 0d35e9f commit 1e7a871
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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'] ) {
Expand Down Expand Up @@ -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();
}
);
6 changes: 4 additions & 2 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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.
Expand Down

0 comments on commit 1e7a871

Please sign in to comment.