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
This commit is contained in:
Dominik Schilling 2015-09-14 22:38:23 +00:00
parent 3778cae8ec
commit e932a2dc5d
2 changed files with 3 additions and 3 deletions

View File

@ -5232,8 +5232,8 @@ class wp_xmlrpc_server extends IXR_Server {
$tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null; $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null;
if ( ('publish' == $post_status) ) { if ( 'publish' == $post_status || 'private' == $post_status ) {
if ( ( 'page' == $post_type ) && ! current_user_can( 'publish_pages' ) ) { 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.' ) ); return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
} elseif ( ! current_user_can( 'publish_posts' ) ) { } elseif ( ! current_user_can( 'publish_posts' ) ) {
return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) ); return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.