Skip to content

Commit

Permalink
s/_wp_insertPost/_insert_post/. Helper funcs should follow core rathe…
Browse files Browse the repository at this point in the history
…r than xmlrpc style. see #18429

git-svn-id: http://svn.automattic.com/wordpress/trunk@19873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Feb 8, 2012
1 parent a0b0149 commit 391fd70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions wp-includes/class-wp-xmlrpc-server.php
Expand Up @@ -598,7 +598,7 @@ function wp_newPost( $args ) {

unset( $content_struct['ID'] );

return $this->_wp_insertPost( $user, $content_struct );
return $this->_insert_post( $user, $content_struct );
}

/*
Expand All @@ -611,7 +611,7 @@ function _is_greater_than_one( $count ){
/*
* Helper method for wp_newPost and wp_editPost, containing shared logic.
*/
function _wp_insertPost( $user, $content_struct ) {
function _insert_post( $user, $content_struct ) {
$defaults = array( 'post_status' => 'draft', 'post_type' => 'post', 'post_author' => 0,
'post_password' => '', 'post_excerpt' => '', 'post_content' => '', 'post_title' => '', 'sticky' => 0 );

Expand Down Expand Up @@ -857,7 +857,7 @@ function wp_editPost( $args ) {

do_action( 'xmlrpc_call', 'wp.editPost' );

// User Capabilities are checked in _wp_insertPost.
// User Capabilities are checked in _insert_post.

$post = get_post( $post_id, ARRAY_A );

Expand All @@ -868,7 +868,7 @@ function wp_editPost( $args ) {
$post['post_date'] = new IXR_Date( mysql2date( 'Ymd\TH:i:s', $post['post_date'], false ) );

// ignore the existing GMT date if it is empty or a non-GMT date was supplied in $content_struct,
// since _wp_insertPost will ignore the non-GMT date if the GMT date is set
// since _insert_post will ignore the non-GMT date if the GMT date is set
if ( $post['post_date_gmt'] == '0000-00-00 00:00:00' || isset( $content_struct['post_date'] ) )
unset( $post['post_date_gmt'] );
else
Expand All @@ -877,7 +877,7 @@ function wp_editPost( $args ) {
$this->escape( $post );
$merged_content_struct = array_merge( $post, $content_struct );

$retval = $this->_wp_insertPost( $user, $merged_content_struct );
$retval = $this->_insert_post( $user, $merged_content_struct );
if ( $retval instanceof IXR_Error )
return $retval;

Expand Down

0 comments on commit 391fd70

Please sign in to comment.