- Timestamp:
- 10/24/2020 01:18:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r48782 r49299 1160 1160 1161 1161 if ( 0 !== (int) $comment->comment_post_ID ) { 1162 $post = get_post( $comment->comment_post_ID ); 1163 1164 if ( ! empty( $post->ID ) ) { 1165 $obj = get_post_type_object( $post->post_type ); 1166 $base = ! empty( $obj->rest_base ) ? $obj->rest_base : $obj->name; 1167 1162 $post = get_post( $comment->comment_post_ID ); 1163 $post_route = rest_get_route_for_post( $post ); 1164 1165 if ( ! empty( $post->ID ) && $post_route ) { 1168 1166 $links['up'] = array( 1169 'href' => rest_url( 'wp/v2/' . $base . '/' . $comment->comment_post_ID),1167 'href' => rest_url( $post_route ), 1170 1168 'embeddable' => true, 1171 1169 'post_type' => $post->post_type,
Note: See TracChangeset
for help on using the changeset viewer.