Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (5 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/post-new.php

    r47550 r47808  
    2626$post_type_object = get_post_type_object( $post_type );
    2727
    28 if ( 'post' == $post_type ) {
     28if ( 'post' === $post_type ) {
    2929    $parent_file  = 'edit.php';
    3030    $submenu_file = 'post-new.php';
    31 } elseif ( 'attachment' == $post_type ) {
     31} elseif ( 'attachment' === $post_type ) {
    3232    if ( wp_redirect( admin_url( 'media-new.php' ) ) ) {
    3333        exit;
Note: See TracChangeset for help on using the changeset viewer.