WordPress.org

Make WordPress Core

Changeset 21145


Ignore:
Timestamp:
06/26/2012 09:07:12 PM (6 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r21137 r21145  
    38993899        // in this function
    39003900        if ( isset( $content_struct['wp_post_format'] ) )
    3901             wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' );
     3901            set_post_format( $post_ID, $content_struct['wp_post_format'] );
    39023902
    39033903        $post_ID = wp_insert_post( $postdata, true );
     
    42164216        // earlier in this function
    42174217        if ( isset( $content_struct['wp_post_format'] ) )
    4218             wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' );
     4218            set_post_format( $post_ID, $content_struct['wp_post_format'] );
    42194219
    42204220        do_action( 'xmlrpc_call_success_mw_editPost', $post_ID, $args );
Note: See TracChangeset for help on using the changeset viewer.