From e932a2dc5d64dc49c61f9c5b4ee17e8aaa4f2c5d Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 14 Sep 2015 22:38:23 +0000 Subject: [PATCH] XMLRPC: Don't allow private posts to be sticky. See #20662. Built from https://develop.svn.wordpress.org/trunk@34135 git-svn-id: http://core.svn.wordpress.org/trunk@34103 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 6a7673e770..78288bd278 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -5232,8 +5232,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.' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index dd7fe851c8..749e2da27c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34134'; +$wp_version = '4.4-alpha-34135'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.