Make WordPress Core


Ignore:
Timestamp:
07/01/2019 12:50:14 PM (5 years ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.

See #47632.

File:
1 edited

Legend:

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

    r45136 r45583  
    110110        }
    111111
    112         if ( 'post' === $post_type && $sticky_posts = get_option( 'sticky_posts' ) ) {
     112        $sticky_posts = get_option( 'sticky_posts' );
     113        if ( 'post' === $post_type && $sticky_posts ) {
    113114            $sticky_posts             = implode( ', ', array_map( 'absint', (array) $sticky_posts ) );
    114115            $this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status NOT IN ('trash', 'auto-draft') AND ID IN ($sticky_posts)", $post_type ) );
     
    244245        $url = add_query_arg( $args, 'edit.php' );
    245246
    246         $class_html = $aria_current = '';
     247        $class_html   = '';
     248        $aria_current = '';
    247249        if ( ! empty( $class ) ) {
    248250            $class_html = sprintf(
     
    996998                $locked_text   = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
    997999            } else {
    998                 $locked_avatar = $locked_text = '';
     1000                $locked_avatar = '';
     1001                $locked_text   = '';
    9991002            }
    10001003
     
    10551058
    10561059        if ( '0000-00-00 00:00:00' === $post->post_date ) {
    1057             $t_time    = $h_time = __( 'Unpublished' );
     1060            $t_time    = __( 'Unpublished' );
     1061            $h_time    = $t_time;
    10581062            $time_diff = 0;
    10591063        } else {
     
    15751579                    }
    15761580
    1577                     if ( $authors = wp_dropdown_users( $users_opt ) ) :
     1581                    $authors = wp_dropdown_users( $users_opt );
     1582                    if ( $authors ) :
    15781583                        $authors_dropdown  = '<label class="inline-edit-author">';
    15791584                        $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
Note: See TracChangeset for help on using the changeset viewer.