Ticket #22204: insert_post.patch
File insert_post.patch, 636 bytes (added by , 12 years ago) |
---|
-
.php
old new class wp_xmlrpc_server_ext extends wp_xm 1026 1026 // empty value deletes, non-empty value adds/updates 1027 1027 if ( ! $post_data['post_thumbnail'] ) 1028 1028 delete_post_thumbnail( $post_ID ); 1029 elseif ( ! set_post_thumbnail( $post_ID, $post_data['post_thumbnail']) )1029 elseif ( ! get_post( absint( $post_data['post_thumbnail'] ) ) ) 1030 1030 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 1031 set_post_thumbnail( $post_ID, $post_data['post_thumbnail'] ); 1031 1032 unset( $content_struct['post_thumbnail'] ); 1032 1033 } 1033 1034