Make WordPress Core


Ignore:
Timestamp:
04/19/2021 11:39:54 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-admin/includes/class-wp-media-list-table.php.

Includes minor code layout fixes for better readability.

See #52627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r50071 r50770  
    649649        while ( have_posts() ) :
    650650            the_post();
     651
    651652            if ( $this->is_trash && 'trash' !== $post->post_status
    652653                || ! $this->is_trash && 'trash' === $post->post_status
     
    654655                continue;
    655656            }
    656             $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other';
     657
     658            $post_owner = ( get_current_user_id() === (int) $post->post_author ) ? 'self' : 'other';
    657659            ?>
    658660            <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
     
    692694                );
    693695            }
     696
    694697            if ( current_user_can( 'delete_post', $post->ID ) ) {
    695698                if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
     
    713716                }
    714717            }
     718
    715719            $actions['view'] = sprintf(
    716720                '<a href="%s" aria-label="%s" rel="bookmark">%s</a>',
     
    740744                );
    741745            }
     746
    742747            if ( current_user_can( 'delete_post', $post->ID ) ) {
    743748                if ( $this->is_trash ) {
     
    758763                    );
    759764                }
     765
    760766                if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {
    761767                    $delete_ays        = ( ! $this->is_trash && ! MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : '';
     
    770776                }
    771777            }
     778
    772779            if ( ! $this->is_trash ) {
    773780                $actions['view'] = sprintf(
Note: See TracChangeset for help on using the changeset viewer.