]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-xmlrpc-server.php
WordPress 4.3.1
[autoinstalls/wordpress.git] / wp-includes / class-wp-xmlrpc-server.php
index 8e7bfb6ce2dd27b92e2eef90c9299b328c6b6661..9121c07a17237578a52b71ff5999b3d4df02826e 100644 (file)
@@ -5234,8 +5234,8 @@ class wp_xmlrpc_server extends IXR_Server {
 
                $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null;
 
-               if ( ('publish' == $post_status) ) {
-                       if ( ( 'page' == $post_type ) && ! current_user_can( 'publish_pages' ) ) {
+               if ( 'publish' == $post_status || 'private' == $post_status ) {
+                       if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) {
                                return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
                        } elseif ( ! current_user_can( 'publish_posts' ) ) {
                                return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );