Use set_post_format(), not wp_set_post_terms(), in XML-RPC mw_newPost and mw_editPost. props koke. see #20697.

git-svn-id: https://develop.svn.wordpress.org/trunk@21145 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-06-26 21:07:12 +00:00
parent 4374f93904
commit af13f116a3

View File

@ -3898,7 +3898,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Handle post formats if assigned, value is validated earlier
// in this function
if ( isset( $content_struct['wp_post_format'] ) )
wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' );
set_post_format( $post_ID, $content_struct['wp_post_format'] );
$post_ID = wp_insert_post( $postdata, true );
if ( is_wp_error( $post_ID ) )
@ -4215,7 +4215,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Handle post formats if assigned, validation is handled
// earlier in this function
if ( isset( $content_struct['wp_post_format'] ) )
wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' );
set_post_format( $post_ID, $content_struct['wp_post_format'] );
do_action( 'xmlrpc_call_success_mw_editPost', $post_ID, $args );