json-endpoints/class.wpcom-json-api-post-endpoint.php 1 location
|
@@ 330-341 (lines=12) @@
|
| 327 |
|
case 'global_ID': |
| 328 |
|
$response[$key] = (string) $this->api->add_global_ID( $blog_id, $post->ID ); |
| 329 |
|
break; |
| 330 |
|
case 'featured_image' : |
| 331 |
|
if ( $is_jetpack && ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) { |
| 332 |
|
$response[ $key ] = get_post_meta( $post->ID, '_jetpack_featured_image', true ); |
| 333 |
|
} else { |
| 334 |
|
$image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); |
| 335 |
|
if ( is_array( $image_attributes ) && isset( $image_attributes[0] ) ) { |
| 336 |
|
$response[ $key ] = (string) $image_attributes[0]; |
| 337 |
|
} else { |
| 338 |
|
$response[ $key ] = ''; |
| 339 |
|
} |
| 340 |
|
} |
| 341 |
|
break; |
| 342 |
|
case 'post_thumbnail' : |
| 343 |
|
$response[$key] = null; |
| 344 |
|
|
json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php 1 location
|
@@ 314-325 (lines=12) @@
|
| 311 |
|
case 'global_ID': |
| 312 |
|
$response[$key] = (string) $this->api->add_global_ID( $blog_id, $post->ID ); |
| 313 |
|
break; |
| 314 |
|
case 'featured_image' : |
| 315 |
|
if ( $is_jetpack && ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ) { |
| 316 |
|
$response[ $key ] = get_post_meta( $post->ID, '_jetpack_featured_image', true ); |
| 317 |
|
} else { |
| 318 |
|
$image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); |
| 319 |
|
if ( is_array( $image_attributes ) && isset( $image_attributes[0] ) ) { |
| 320 |
|
$response[ $key ] = (string) $image_attributes[0]; |
| 321 |
|
} else { |
| 322 |
|
$response[ $key ] = ''; |
| 323 |
|
} |
| 324 |
|
} |
| 325 |
|
break; |
| 326 |
|
case 'post_thumbnail' : |
| 327 |
|
$response[$key] = null; |
| 328 |
|
|