XMLRPC: Fix the featured image support in mw_newPost to use the correct variable names. See #18429 and [UT592].

git-svn-id: http://svn.automattic.com/wordpress/trunk@20321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2012-03-29 11:06:17 +00:00
parent 69f8d3b242
commit 944af3e88b

View File

@ -3753,8 +3753,8 @@ class wp_xmlrpc_server extends IXR_Server {
if ( isset($content_struct['custom_fields']) )
$this->set_custom_fields($post_ID, $content_struct['custom_fields']);
if ( isset ( $post_data['wp_featured_image'] ) ) {
if ( set_post_thumbnail( $post_ID, $post_data['wp_featured_image'] ) === false )
if ( isset ( $content_struct['wp_featured_image'] ) ) {
if ( set_post_thumbnail( $post_ID, $content_struct['wp_featured_image'] ) === false )
return new IXR_Error( 404, __( 'Invalid attachment ID.' ) );
unset( $content_struct['wp_featured_image'] );