Skip to content
Permalink
Browse files Browse the repository at this point in the history
XMLRPC: Don't allow private posts to be sticky.
Merge of [34135] to the 4.3 branch.

See #20662.
Built from https://develop.svn.wordpress.org/branches/4.3@34151


git-svn-id: http://core.svn.wordpress.org/branches/4.3@34119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ocean90 committed Sep 14, 2015
1 parent f72b21a commit 9c57f3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-includes/class-wp-xmlrpc-server.php
Expand Up @@ -5234,8 +5234,8 @@ public function mw_editPost( $args ) {

$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.' ) );
Expand Down

0 comments on commit 9c57f3a

Please sign in to comment.