Make WordPress Core

Changeset 19873


Ignore:
Timestamp:
02/08/2012 05:00:19 PM (13 years ago)
Author:
ryan
Message:

s/_wp_insertPost/_insert_post/. Helper funcs should follow core rather than xmlrpc style. see #18429

File:
1 edited

Legend:

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

    r19869 r19873  
    599599        unset( $content_struct['ID'] );
    600600
    601         return $this->_wp_insertPost( $user, $content_struct );
     601        return $this->_insert_post( $user, $content_struct );
    602602    }
    603603
     
    612612     * Helper method for wp_newPost and wp_editPost, containing shared logic.
    613613     */
    614     function _wp_insertPost( $user, $content_struct ) {
     614    function _insert_post( $user, $content_struct ) {
    615615        $defaults = array( 'post_status' => 'draft', 'post_type' => 'post', 'post_author' => 0,
    616616            'post_password' => '', 'post_excerpt' => '', 'post_content' => '', 'post_title' => '', 'sticky' => 0 );
     
    858858        do_action( 'xmlrpc_call', 'wp.editPost' );
    859859
    860         // User Capabilities are checked in _wp_insertPost.
     860        // User Capabilities are checked in _insert_post.
    861861
    862862        $post = get_post( $post_id, ARRAY_A );
     
    869869
    870870        // ignore the existing GMT date if it is empty or a non-GMT date was supplied in $content_struct,
    871         // since _wp_insertPost will ignore the non-GMT date if the GMT date is set
     871        // since _insert_post will ignore the non-GMT date if the GMT date is set
    872872        if ( $post['post_date_gmt'] == '0000-00-00 00:00:00' || isset( $content_struct['post_date'] ) )
    873873            unset( $post['post_date_gmt'] );
     
    878878        $merged_content_struct = array_merge( $post, $content_struct );
    879879
    880         $retval = $this->_wp_insertPost( $user, $merged_content_struct );
     880        $retval = $this->_insert_post( $user, $merged_content_struct );
    881881        if ( $retval instanceof IXR_Error )
    882882            return $retval;
Note: See TracChangeset for help on using the changeset viewer.