Make WordPress Core


Ignore:
Timestamp:
05/12/2020 06:30:03 PM (5 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/export.php

    r47272 r47785  
    6363    $args = array();
    6464
    65     if ( ! isset( $_GET['content'] ) || 'all' == $_GET['content'] ) {
     65    if ( ! isset( $_GET['content'] ) || 'all' === $_GET['content'] ) {
    6666        $args['content'] = 'all';
    67     } elseif ( 'posts' == $_GET['content'] ) {
     67    } elseif ( 'posts' === $_GET['content'] ) {
    6868        $args['content'] = 'post';
    6969
     
    8484            $args['status'] = $_GET['post_status'];
    8585        }
    86     } elseif ( 'pages' == $_GET['content'] ) {
     86    } elseif ( 'pages' === $_GET['content'] ) {
    8787        $args['content'] = 'page';
    8888
     
    9999            $args['status'] = $_GET['page_status'];
    100100        }
    101     } elseif ( 'attachment' == $_GET['content'] ) {
     101    } elseif ( 'attachment' === $_GET['content'] ) {
    102102        $args['content'] = 'attachment';
    103103
     
    145145        WHERE post_type = %s AND post_status != 'auto-draft'
    146146        ORDER BY post_date DESC
    147     ",
     147            ",
    148148            $post_type
    149149        )
     
    151151
    152152    $month_count = count( $months );
    153     if ( ! $month_count || ( 1 == $month_count && 0 == $months[0]->month ) ) {
     153    if ( ! $month_count || ( 1 === $month_count && 0 === (int) $months[0]->month ) ) {
    154154        return;
    155155    }
    156156
    157157    foreach ( $months as $date ) {
    158         if ( 0 == $date->year ) {
     158        if ( 0 === (int) $date->year ) {
    159159            continue;
    160160        }
Note: See TracChangeset for help on using the changeset viewer.