XML-RPC: In `wp_xmlrpc_server::blogger_editPost()`, make use of the `$publish` arg (the 6th arg passed to the method) to specify `publish` or `draft`. Restores the arg, which I removed in [31092], because it was unused cruft.

Props mdawaffe.
Fixes #10764.

Built from https://develop.svn.wordpress.org/trunk@34573


git-svn-id: http://core.svn.wordpress.org/trunk@34537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-26 04:01:26 +00:00
parent dd1098e7c5
commit 9b253bbc7b
2 changed files with 4 additions and 1 deletions

View File

@ -4563,6 +4563,7 @@ class wp_xmlrpc_server extends IXR_Server {
* @type string $username
* @type string $password
* @type string $content
* @type bool $publish
* }
* @return true|IXR_Error true when done.
*/
@ -4574,6 +4575,7 @@ class wp_xmlrpc_server extends IXR_Server {
$username = $args[2];
$password = $args[3];
$content = $args[4];
$publish = $args[5];
if ( ! $user = $this->login( $username, $password ) ) {
return $this->error;
@ -4604,6 +4606,7 @@ class wp_xmlrpc_server extends IXR_Server {
$postdata['post_category'] = xmlrpc_getpostcategory( $content );
$postdata['post_status'] = $actual_post['post_status'];
$postdata['post_excerpt'] = $actual_post['post_excerpt'];
$postdata['post_status'] = $publish ? 'publish' : 'draft';
$result = wp_update_post( $postdata );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34572';
$wp_version = '4.4-alpha-34573';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.