Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove WP 6.0 WP_REST_Block_Patterns_Controller class #41914

Merged
merged 1 commit into from
Jun 23, 2022
Merged
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
219 changes: 0 additions & 219 deletions lib/compat/wordpress-6.0/class-wp-rest-block-patterns-controller.php

This file was deleted.

9 changes: 0 additions & 9 deletions lib/compat/wordpress-6.0/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ function gutenberg_register_edit_site_export_endpoint() {
}
add_action( 'rest_api_init', 'gutenberg_register_edit_site_export_endpoint' );

/**
* Registers the block patterns REST API routes.
*/
function gutenberg_register_rest_block_patterns() {
$block_patterns = new WP_REST_Block_Patterns_Controller();
$block_patterns->register_routes();
}
add_action( 'rest_api_init', 'gutenberg_register_rest_block_patterns' );

/**
* Registers the block pattern categories REST API routes.
*/
Expand Down
3 changes: 0 additions & 3 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ function gutenberg_is_experiment_enabled( $name ) {
require_once __DIR__ . '/compat/wordpress-6.0/class-gutenberg-rest-global-styles-controller.php';
require_once __DIR__ . '/compat/wordpress-6.0/class-gutenberg-rest-pattern-directory-controller.php';
require_once __DIR__ . '/compat/wordpress-6.0/class-gutenberg-rest-edit-site-export-controller.php';
if ( ! class_exists( 'WP_REST_Block_Patterns_Controller' ) ) {
require_once __DIR__ . '/compat/wordpress-6.0/class-wp-rest-block-patterns-controller.php';
}
if ( ! class_exists( 'WP_REST_Block_Pattern_Categories_Controller' ) ) {
require_once __DIR__ . '/compat/wordpress-6.0/class-wp-rest-block-pattern-categories-controller.php';
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Unit tests covering WP_REST_Block_Patterns_Controller functionality.
* Unit tests covering Gutenberg_REST_Block_Patterns_Controller functionality.
*
* @package WordPress
* @subpackage REST_API
Expand All @@ -10,9 +10,9 @@
* Unit tests for REST API for Block Patterns.
*
* @group restapi
* @covers WP_REST_Block_Patterns_Controller
* @covers Gutenberg_REST_Block_Patterns_Controller
*/
class WP_REST_Block_Patterns_Controller_Test extends WP_Test_REST_Controller_Testcase {
class Gutenberg_REST_Block_Patterns_Controller_Test extends WP_Test_REST_Controller_Testcase {
protected static $admin_id;
protected static $orig_registry;

Expand Down