Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:51:22 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions in some wp-admin files.

Props subrataemfluence, marcio-zebedeu, bookdude13, 1naveengiri, alishankhan.
Fixes #44365, #48455.

File:
1 edited

Legend:

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

    r47198 r47218  
    3434
    3535// Require an ID for the edit screen.
    36 if ( isset( $action ) && $action == 'edit' && ! $ID ) {
     36if ( isset( $action ) && 'edit' == $action && ! $ID ) {
    3737    wp_die(
    3838        '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
     
    8282
    8383// Let the action code decide how to handle the request.
    84 if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab, media_upload_tabs() ) ) {
     84if ( 'type' == $tab || 'type_url' == $tab || ! array_key_exists( $tab, media_upload_tabs() ) ) {
    8585    /**
    8686     * Fires inside specific upload-type views in the legacy (pre-3.5.0)
Note: See TracChangeset for help on using the changeset viewer.