WordPress.org

Make WordPress Core

Ticket #20697: patch-core-20697.diff

File patch-core-20697.diff, 1.1 KB (added by koke, 2 years ago)
  • wp-includes/class-wp-xmlrpc-server.php

    diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php
    index 1a4d1ca..d6acba6 100644
    a b class wp_xmlrpc_server extends IXR_Server { 
    38953895                // Handle post formats if assigned, value is validated earlier 
    38963896                // in this function 
    38973897                if ( isset( $content_struct['wp_post_format'] ) ) 
    3898                         wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' ); 
     3898                        set_post_format( $post_ID, $content_struct['wp_post_format'] ); 
    38993899 
    39003900                $post_ID = wp_insert_post( $postdata, true ); 
    39013901                if ( is_wp_error( $post_ID ) ) 
    class wp_xmlrpc_server extends IXR_Server { 
    42124212                // Handle post formats if assigned, validation is handled 
    42134213                // earlier in this function 
    42144214                if ( isset( $content_struct['wp_post_format'] ) ) 
    4215                         wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' ); 
     4215                        set_post_format( $post_ID, $content_struct['wp_post_format'] ); 
    42164216 
    42174217                do_action( 'xmlrpc_call_success_mw_editPost', $post_ID, $args ); 
    42184218