mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3211,10 +3211,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
|
||||
if ( !$user ) {
|
||||
$logged_in = false;
|
||||
if ( $allow_anon && get_option('comment_registration') )
|
||||
if ( $allow_anon && get_option('comment_registration') ) {
|
||||
return new IXR_Error( 403, __( 'You must be registered to comment' ) );
|
||||
else if ( !$allow_anon )
|
||||
} elseif ( ! $allow_anon ) {
|
||||
return $this->error;
|
||||
}
|
||||
} else {
|
||||
$logged_in = true;
|
||||
}
|
||||
@@ -4873,10 +4874,11 @@ 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') )
|
||||
return new IXR_Error(401, __('Sorry, you do not have the right to publish this page.'));
|
||||
else if ( !current_user_can('publish_posts') )
|
||||
return new IXR_Error(401, __('Sorry, you do not have the right to publish this post.'));
|
||||
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.' ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $post_more )
|
||||
|
||||
Reference in New Issue
Block a user