json-endpoints/class.wpcom-json-api-post-endpoint.php 1 location
|
@@ 346-354 (lines=9) @@
|
343 |
|
$response[$key] = null; |
344 |
|
|
345 |
|
$thumb_id = get_post_thumbnail_id( $post->ID ); |
346 |
|
if ( ! empty( $thumb_id ) ) { |
347 |
|
$attachment = get_post( $thumb_id ); |
348 |
|
if ( ! empty( $attachment ) ) |
349 |
|
$featured_image_object = $this->get_attachment( $attachment ); |
350 |
|
|
351 |
|
if ( ! empty( $featured_image_object ) ) { |
352 |
|
$response[$key] = (object) $featured_image_object; |
353 |
|
} |
354 |
|
} |
355 |
|
break; |
356 |
|
case 'format' : |
357 |
|
$response[$key] = (string) get_post_format( $post->ID ); |
sal/class.json-api-post-base.php 1 location
|
@@ 254-262 (lines=9) @@
|
251 |
|
|
252 |
|
$thumb_id = get_post_thumbnail_id( $this->post->ID ); |
253 |
|
|
254 |
|
if ( ! empty( $thumb_id ) ) { |
255 |
|
$attachment = get_post( $thumb_id ); |
256 |
|
if ( ! empty( $attachment ) ) |
257 |
|
$featured_image_object = $this->get_attachment( $attachment ); |
258 |
|
|
259 |
|
if ( ! empty( $featured_image_object ) ) { |
260 |
|
$thumb = (object) $featured_image_object; |
261 |
|
} |
262 |
|
} |
263 |
|
|
264 |
|
return $thumb; |
265 |
|
} |