From 354000b5ca0d216585db9f040e5c7d083b356e3b Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Mon, 14 Sep 2015 22:37:21 +0000 Subject: [PATCH] XMLRPC: Don't allow private posts to be sticky. See #20662. git-svn-id: https://develop.svn.wordpress.org/trunk@34135 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-xmlrpc-server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index 6a7673e770..78288bd278 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/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.' ) );