mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
06bc3bf328
commit
9b7e633336
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user