WordPress.org

Make WordPress Core

Changeset 44566


Ignore:
Timestamp:
01/11/2019 06:39:55 AM (3 months ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace violations.

See #45934.

Location:
trunk/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/export.php

    r43571 r44566  
    204204     */
    205205    function wxr_site_url() {
    206         // Multisite: the base URL.
    207206        if ( is_multisite() ) {
     207            // Multisite: the base URL.
    208208            return network_home_url();
    209         } // WordPress (single site): the blog URL.
    210         else {
     209        } else {
     210            // WordPress (single site): the blog URL.
    211211            return get_bloginfo_rss( 'url' );
    212212        }
  • trunk/src/wp-admin/includes/image.php

    r44385 r44566  
    216216            }
    217217        }
    218     } // Try to create image thumbnails for PDFs
    219     elseif ( 'application/pdf' === $mime_type ) {
     218    } elseif ( 'application/pdf' === $mime_type ) {
     219        // Try to create image thumbnails for PDFs.
     220
    220221        $fallback_sizes = array(
    221222            'thumbnail',
  • trunk/src/wp-admin/update-core.php

    r44451 r44566  
    4040    if ( 'en_US' == $update->locale && 'en_US' == get_locale() ) {
    4141        $version_string = $update->current;
    42     } // If the only available update is a partial builds, it doesn't need a language-specific version string.
    43     elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ( $updates = get_core_updates() ) && 1 == count( $updates ) ) {
     42    } elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ( $updates = get_core_updates() ) && 1 == count( $updates ) ) {
     43        // If the only available update is a partial builds, it doesn't need a language-specific version string.
    4444        $version_string = $update->current;
    4545    } else {
     
    122122    if ( 'en_US' != $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) {
    123123        echo '<p class="hint">' . __( 'This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.' ) . '</p>';
    124     } // Partial builds don't need language-specific warnings.
    125     elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) {
     124    } elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) {
     125        // Partial builds don't need language-specific warnings.
    126126        echo '<p class="hint">' . sprintf( __( 'You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.' ), $update->response != 'development' ? $update->current : '' ) . '</p>';
    127127    }
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r44382 r44566  
    456456            if ( $next_id ) {
    457457                $next_attachment_url = get_attachment_link( $next_id );
    458             } // or get the URL of the first image attachment.
    459             else {
     458            } else {
     459                // or get the URL of the first image attachment.
    460460                $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
    461461            }
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r44382 r44566  
    588588            if ( $next_id ) {
    589589                $next_attachment_url = get_attachment_link( $next_id );
    590             } // or get the URL of the first image attachment.
    591             else {
     590            } else {
     591                // or get the URL of the first image attachment.
    592592                $next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
    593593            }
  • trunk/src/wp-includes/class-wp-locale.php

    r42718 r44566  
    217217        if ( isset( $GLOBALS['text_direction'] ) ) {
    218218            $this->text_direction = $GLOBALS['text_direction'];
    219         } /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
    220         elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) {
     219
     220            /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
     221        } elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) {
    221222            $this->text_direction = 'rtl';
    222223        }
  • trunk/src/wp-includes/class-wp-text-diff-renderer-table.php

    r44129 r44566  
    390390            if ( isset( $orig_matches[ $o ] ) ) {
    391391                $final_matches[ $f ] = 'x';
    392             } // Best match of this orig is already taken?  Must mean this orig is a deleted row.
    393             elseif ( isset( $final_matches[ $f ] ) ) {
     392            } elseif ( isset( $final_matches[ $f ] ) ) {
     393                // Best match of this orig is already taken?  Must mean this orig is a deleted row.
    394394                $orig_matches[ $o ] = 'x';
    395395            }
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r44166 r44566  
    28982898        if ( $page->ID && ( $page->post_type == 'page' ) ) {
    28992899            return $this->_prepare_page( $page );
    2900         } // If the page doesn't exist indicate that.
    2901         else {
     2900        } else {
     2901            // If the page doesn't exist indicate that.
    29022902            return new IXR_Error( 404, __( 'Sorry, no such page.' ) );
    29032903        }
  • trunk/src/wp-includes/formatting.php

    r44556 r44566  
    24792479                $tag = '';
    24802480                // or close to be safe $tag = '/' . $tag;
    2481             } // if stacktop value = tag close value then pop
    2482             elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag
     2481
     2482                // if stacktop value = tag close value then pop
     2483            } elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag
    24832484                $tag = '</' . $tag . '>'; // Close Tag
    24842485                // Pop
     
    25062507            if ( '' == $tag ) {
    25072508                // do nothing
    2508             } // ElseIf it presents itself as a self-closing tag...
    2509             elseif ( substr( $regex[2], -1 ) == '/' ) {
     2509            } elseif ( substr( $regex[2], -1 ) == '/' ) { // ElseIf it presents itself as a self-closing tag...
    25102510                // ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such and
    25112511                // immediately close it with a closing tag (the tag will encapsulate no text as a result)
     
    25132513                    $regex[2] = trim( substr( $regex[2], 0, -1 ) ) . "></$tag";
    25142514                }
    2515             } // ElseIf it's a known single-entity tag but it doesn't close itself, do so
    2516             elseif ( in_array( $tag, $single_tags ) ) {
     2515            } elseif ( in_array( $tag, $single_tags ) ) { // ElseIf it's a known single-entity tag but it doesn't close itself, do so
    25172516                $regex[2] .= '/';
    2518             } // Else it's not a single-entity tag
    2519             else {
     2517            } else { // Else it's not a single-entity tag
    25202518                // If the top of the stack is the same as the tag we want to push, close previous tag
    25212519                if ( $stacksize > 0 && ! in_array( $tag, $nestable_tags ) && $tagstack[ $stacksize - 1 ] == $tag ) {
  • trunk/src/wp-includes/general-template.php

    r44565 r44566  
    921921            wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr )
    922922        );
    923     } // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
    924     elseif ( is_customize_preview() ) {
     923    } elseif ( is_customize_preview() ) {
     924        // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
    925925        $html = sprintf(
    926926            '<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo"/></a>',
  • trunk/src/wp-includes/load.php

    r44524 r44566  
    6969    if ( empty( $_SERVER['REQUEST_URI'] ) || ( PHP_SAPI != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {
    7070
    71         // IIS Mod-Rewrite
    7271        if ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) {
     72            // IIS Mod-Rewrite
    7373            $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
    74         } // IIS Isapi_Rewrite
    75         elseif ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ) {
     74        } elseif ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ) {
     75            // IIS Isapi_Rewrite
    7676            $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
    7777        } else {
  • trunk/src/wp-includes/media.php

    r44548 r44566  
    105105            $max_width = min( intval( $content_width ), $max_width );
    106106        }
    107     } // $size == 'full' has no constraint
    108     else {
     107    } else { // $size == 'full' has no constraint
    109108        $max_width  = $width;
    110109        $max_height = $height;
Note: See TracChangeset for help on using the changeset viewer.