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

git-svn-id: http://core.svn.wordpress.org/trunk@21145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-06-26 21:07:12 +00:00
parent 06bc3bf328
commit 9b7e633336
1 changed files with 2 additions and 2 deletions

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 );