- Timestamp:
- 09/23/2019 08:24:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r45932 r46272 1593 1593 */ 1594 1594 protected function check_read_post_permission( $post, $request ) { 1595 $posts_controller = new WP_REST_Posts_Controller( $post->post_type );1596 1595 $post_type = get_post_type_object( $post->post_type ); 1596 $posts_controller = $post_type->get_rest_controller(); 1597 1598 // Ensure the posts controller is specifically a WP_REST_Posts_Controller instance 1599 // before using methods specific to that controller. 1600 if ( ! $posts_controller instanceof WP_REST_Posts_Controller ) { 1601 $posts_controller = new WP_REST_Posts_Controller( $post->post_type ); 1602 } 1597 1603 1598 1604 $has_password_filter = false;
Note: See TracChangeset
for help on using the changeset viewer.