- Timestamp:
- 07/02/2019 11:41:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r45424 r45590 1580 1580 1581 1581 if ( in_array( 'template', $fields, true ) ) { 1582 if ( $template = get_page_template_slug( $post->ID ) ) { 1582 $template = get_page_template_slug( $post->ID ); 1583 if ( $template ) { 1583 1584 $data['template'] = $template; 1584 1585 } else { … … 1748 1749 1749 1750 // If we have a featured media, add that. 1750 if ( $featured_media = get_post_thumbnail_id( $post->ID ) ) { 1751 $featured_media = get_post_thumbnail_id( $post->ID ); 1752 if ( $featured_media ) { 1751 1753 $image_url = rest_url( 'wp/v2/media/' . $featured_media ); 1752 1754
Note: See TracChangeset
for help on using the changeset viewer.