mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 07:04:34 +00:00
REST API: Ensure rest_controller instantiates the post type's declared REST controller class.
Ensures that the ::get_rest_controller() method will always return an instanceof the expected controller class, or null. Removes unused private static property $post_type_controllers. Props dlh, TimothyBlynJacobs. Fixes #45677. git-svn-id: https://develop.svn.wordpress.org/trunk@46435 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -15,15 +15,6 @@
|
||||
* @see WP_REST_Controller
|
||||
*/
|
||||
class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
|
||||
/**
|
||||
* Instances of post type controllers keyed by post type.
|
||||
*
|
||||
* @since 5.3.0
|
||||
* @var WP_REST_Controller[]
|
||||
*/
|
||||
private static $post_type_controllers = array();
|
||||
|
||||
/**
|
||||
* Post type.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user