|
@@ 5181-5186 (lines=6) @@
|
| 5178 |
|
if ( isset($content_struct['custom_fields']) ) |
| 5179 |
|
$this->set_custom_fields($post_ID, $content_struct['custom_fields']); |
| 5180 |
|
|
| 5181 |
|
if ( isset ( $content_struct['wp_post_thumbnail'] ) ) { |
| 5182 |
|
if ( set_post_thumbnail( $post_ID, $content_struct['wp_post_thumbnail'] ) === false ) |
| 5183 |
|
return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); |
| 5184 |
|
|
| 5185 |
|
unset( $content_struct['wp_post_thumbnail'] ); |
| 5186 |
|
} |
| 5187 |
|
|
| 5188 |
|
// Handle enclosures |
| 5189 |
|
$thisEnclosure = isset($content_struct['enclosure']) ? $content_struct['enclosure'] : null; |
|
@@ 5544-5549 (lines=6) @@
|
| 5541 |
|
if ( isset ( $content_struct['wp_post_thumbnail'] ) ) { |
| 5542 |
|
|
| 5543 |
|
// Empty value deletes, non-empty value adds/updates. |
| 5544 |
|
if ( empty( $content_struct['wp_post_thumbnail'] ) ) { |
| 5545 |
|
delete_post_thumbnail( $post_ID ); |
| 5546 |
|
} else { |
| 5547 |
|
if ( set_post_thumbnail( $post_ID, $content_struct['wp_post_thumbnail'] ) === false ) |
| 5548 |
|
return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); |
| 5549 |
|
} |
| 5550 |
|
unset( $content_struct['wp_post_thumbnail'] ); |
| 5551 |
|
} |
| 5552 |
|
|