Skip to content

Commit 9c57f3a

Browse files
committed
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
1 parent f72b21a commit 9c57f3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: wp-includes/class-wp-xmlrpc-server.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5234,8 +5234,8 @@ public function mw_editPost( $args ) {
52345234

52355235
$tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null;
52365236

5237-
if ( ('publish' == $post_status) ) {
5238-
if ( ( 'page' == $post_type ) && ! current_user_can( 'publish_pages' ) ) {
5237+
if ( 'publish' == $post_status || 'private' == $post_status ) {
5238+
if ( 'page' == $post_type && ! current_user_can( 'publish_pages' ) ) {
52395239
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
52405240
} elseif ( ! current_user_can( 'publish_posts' ) ) {
52415241
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );

0 commit comments

Comments
 (0)