Make WordPress Core


Ignore:
Timestamp:
05/12/2020 06:30:03 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in some wp-admin files.

Props pikamander2, mukesh27, SergeyBiryukov.
Fixes #49239.

File:
1 edited

Legend:

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

    r47218 r47785  
    3030
    3131// IDs should be integers.
    32 $ID      = isset( $ID ) ? (int) $ID : 0;
     32$ID      = isset( $ID ) ? (int) $ID : 0; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
    3333$post_id = isset( $post_id ) ? (int) $post_id : 0;
    3434
    3535// Require an ID for the edit screen.
    36 if ( isset( $action ) && 'edit' == $action && ! $ID ) {
     36if ( isset( $action ) && 'edit' === $action && ! $ID ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName
    3737    wp_die(
    3838        '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
     
    8282
    8383// Let the action code decide how to handle the request.
    84 if ( 'type' == $tab || 'type_url' == $tab || ! 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.