Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where static strings are involved.

This reduces the number of WordPress.PHP.StrictComparisons.LooseComparison issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.

File:
1 edited

Legend:

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

    r47550 r47808  
    2323    $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
    2424
    25     if ( 'update-selected' == $action ) {
     25    if ( 'update-selected' === $action ) {
    2626        if ( ! current_user_can( 'update_plugins' ) ) {
    2727            wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
     
    5151        iframe_footer();
    5252
    53     } elseif ( 'upgrade-plugin' == $action ) {
     53    } elseif ( 'upgrade-plugin' === $action ) {
    5454        if ( ! current_user_can( 'update_plugins' ) ) {
    5555            wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
     
    7373        require_once ABSPATH . 'wp-admin/admin-footer.php';
    7474
    75     } elseif ( 'activate-plugin' == $action ) {
     75    } elseif ( 'activate-plugin' === $action ) {
    7676        if ( ! current_user_can( 'update_plugins' ) ) {
    7777            wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
     
    9999        }
    100100        iframe_footer();
    101     } elseif ( 'install-plugin' == $action ) {
     101    } elseif ( 'install-plugin' === $action ) {
    102102
    103103        if ( ! current_user_can( 'install_plugins' ) ) {
     
    142142        require_once ABSPATH . 'wp-admin/admin-footer.php';
    143143
    144     } elseif ( 'upload-plugin' == $action ) {
     144    } elseif ( 'upload-plugin' === $action ) {
    145145
    146146        if ( ! current_user_can( 'upload_plugins' ) ) {
     
    172172        require_once ABSPATH . 'wp-admin/admin-footer.php';
    173173
    174     } elseif ( 'upgrade-theme' == $action ) {
     174    } elseif ( 'upgrade-theme' === $action ) {
    175175
    176176        if ( ! current_user_can( 'update_themes' ) ) {
     
    194194
    195195        require_once ABSPATH . 'wp-admin/admin-footer.php';
    196     } elseif ( 'update-selected-themes' == $action ) {
     196    } elseif ( 'update-selected-themes' === $action ) {
    197197        if ( ! current_user_can( 'update_themes' ) ) {
    198198            wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
     
    221221
    222222        iframe_footer();
    223     } elseif ( 'install-theme' == $action ) {
     223    } elseif ( 'install-theme' === $action ) {
    224224
    225225        if ( ! current_user_can( 'install_themes' ) ) {
     
    261261        require_once ABSPATH . 'wp-admin/admin-footer.php';
    262262
    263     } elseif ( 'upload-theme' == $action ) {
     263    } elseif ( 'upload-theme' === $action ) {
    264264
    265265        if ( ! current_user_can( 'upload_themes' ) ) {
Note: See TracChangeset for help on using the changeset viewer.