Make WordPress Core


Ignore:
Timestamp:
01/08/2015 07:04:40 AM (11 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r31079 r31090  
    32123212        if ( !$user ) {
    32133213            $logged_in = false;
    3214             if ( $allow_anon && get_option('comment_registration') )
     3214            if ( $allow_anon && get_option('comment_registration') ) {
    32153215                return new IXR_Error( 403, __( 'You must be registered to comment' ) );
    3216             else if ( !$allow_anon )
     3216            } elseif ( ! $allow_anon ) {
    32173217                return $this->error;
     3218            }
    32183219        } else {
    32193220            $logged_in = true;
     
    48744875
    48754876        if ( ('publish' == $post_status) ) {
    4876             if ( ( 'page' == $post_type ) && !current_user_can('publish_pages') )
    4877                 return new IXR_Error(401, __('Sorry, you do not have the right to publish this page.'));
    4878             else if ( !current_user_can('publish_posts') )
    4879                 return new IXR_Error(401, __('Sorry, you do not have the right to publish this post.'));
     4877            if ( ( 'page' == $post_type ) && ! current_user_can( 'publish_pages' ) ) {
     4878                return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) );
     4879            } elseif ( ! current_user_can( 'publish_posts' ) ) {
     4880                return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) );
     4881            }
    48804882        }
    48814883
Note: See TracChangeset for help on using the changeset viewer.