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

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2019-07-01 12:50:14 +00:00
parent 5fe76184f2
commit 9a1549767e
74 changed files with 634 additions and 337 deletions
@@ -109,7 +109,8 @@ class WP_Posts_List_Table extends WP_List_Table {
$_GET['author'] = get_current_user_id();
}
if ( 'post' === $post_type && $sticky_posts = get_option( 'sticky_posts' ) ) {
$sticky_posts = get_option( 'sticky_posts' );
if ( 'post' === $post_type && $sticky_posts ) {
$sticky_posts = implode( ', ', array_map( 'absint', (array) $sticky_posts ) );
$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 ) );
}
@@ -243,7 +244,8 @@ class WP_Posts_List_Table extends WP_List_Table {
protected function get_edit_link( $args, $label, $class = '' ) {
$url = add_query_arg( $args, 'edit.php' );
$class_html = $aria_current = '';
$class_html = '';
$aria_current = '';
if ( ! empty( $class ) ) {
$class_html = sprintf(
' class="%s"',
@@ -995,7 +997,8 @@ class WP_Posts_List_Table extends WP_List_Table {
$locked_avatar = get_avatar( $lock_holder->ID, 18 );
$locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
} else {
$locked_avatar = $locked_text = '';
$locked_avatar = '';
$locked_text = '';
}
echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
@@ -1054,7 +1057,8 @@ class WP_Posts_List_Table extends WP_List_Table {
global $mode;
if ( '0000-00-00 00:00:00' === $post->post_date ) {
$t_time = $h_time = __( 'Unpublished' );
$t_time = __( 'Unpublished' );
$h_time = $t_time;
$time_diff = 0;
} else {
$t_time = get_the_time( __( 'Y/m/d g:i:s a' ) );
@@ -1574,7 +1578,8 @@ class WP_Posts_List_Table extends WP_List_Table {
$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
}
if ( $authors = wp_dropdown_users( $users_opt ) ) :
$authors = wp_dropdown_users( $users_opt );
if ( $authors ) :
$authors_dropdown = '<label class="inline-edit-author">';
$authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
$authors_dropdown .= $authors;