Changeset 46272 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 09/23/2019 08:24:59 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r46249 r46272 193 193 function create_initial_rest_routes() { 194 194 foreach ( get_post_types( array( 'show_in_rest' => true ), 'objects' ) as $post_type ) { 195 $class = ! empty( $post_type->rest_controller_class ) ? $post_type->rest_controller_class : 'WP_REST_Posts_Controller'; 196 197 if ( ! class_exists( $class ) ) { 198 continue; 199 } 200 $controller = new $class( $post_type->name ); 201 if ( ! is_subclass_of( $controller, 'WP_REST_Controller' ) ) { 195 $controller = $post_type->get_rest_controller(); 196 197 if ( ! $controller ) { 202 198 continue; 203 199 }
Note: See TracChangeset
for help on using the changeset viewer.