Ticket #32434: 32434.2.patch
File 32434.2.patch, 3.6 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/list-tables.css
259 259 } 260 260 261 261 .fixed .column-posts { 262 262 width: 74px; 263 263 } 264 264 265 265 .fixed .column-comment .comment-author { … … 1491 1491 background: #fecac2; 1492 1492 } 1493 1493 1494 .sites.fixed .column-lastupdated, 1495 .sites.fixed .column-registered { 1496 width: 20%; 1497 } 1498 1499 .sites.fixed .column-users { 1500 width: 80px; 1501 } 1502 1494 1503 /* =Media Queries 1495 1504 -------------------------------------------------------------- */ 1496 1505 -
src/wp-admin/includes/class-wp-ms-sites-list-table.php
111 111 } elseif ( $order_by == 'lastupdated' ) { 112 112 $query .= ' ORDER BY last_updated '; 113 113 } elseif ( $order_by == 'blogname' ) { 114 if ( is_subdomain_install() ) 114 if ( is_subdomain_install() ) { 115 115 $query .= ' ORDER BY domain '; 116 else116 } else { 117 117 $query .= ' ORDER BY path '; 118 } 118 119 } elseif ( $order_by == 'blog_id' ) { 119 120 $query .= ' ORDER BY blog_id '; 120 121 } else { … … 182 183 * @return array 183 184 */ 184 185 public function get_columns() { 185 $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );186 186 $sites_columns = array( 187 187 'cb' => '<input type="checkbox" />', 188 'blogname' => $blogname_columns,188 'blogname' => __( 'URL' ), 189 189 'lastupdated' => __( 'Last Updated' ), 190 190 'registered' => _x( 'Registered', 'site' ), 191 'users' => __( 'Users' ) 191 'users' => __( 'Users' ), 192 192 ); 193 193 194 if ( has_filter( 'wpmublogsaction' ) ) 194 if ( has_filter( 'wpmublogsaction' ) ) { 195 195 $sites_columns['plugins'] = __( 'Actions' ); 196 } 196 197 197 198 /** 198 199 * Filter the displayed site columns in Sites list table. … … 261 262 } 262 263 echo "<tr{$class}>"; 263 264 264 $blogname = ( is_subdomain_install() ) ? str_replace( '.' . get_current_site()->domain, '', $blog['domain'] ) :$blog['path'];265 $blogname = $blog['domain'] . $blog['path']; 265 266 266 267 list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); 267 268 … … 322 323 break; 323 324 324 325 case 'users': 325 $blogusers = get_users( array( 'blog_id' => $blog['blog_id'], 'number' => 6) ); 326 if ( is_array( $blogusers ) ) { 327 $blogusers_warning = ''; 328 if ( count( $blogusers ) > 5 ) { 329 $blogusers = array_slice( $blogusers, 0, 5 ); 330 $blogusers_warning = __( 'Only showing first 5 users.' ) . ' <a href="' . esc_url( network_admin_url( 'site-users.php?id=' . $blog['blog_id'] ) ) . '">' . __( 'More' ) . '</a>'; 331 } 332 foreach ( $blogusers as $user_object ) { 333 echo '<a href="' . esc_url( network_admin_url( 'user-edit.php?user_id=' . $user_object->ID ) ) . '">' . esc_html( $user_object->user_login ) . '</a> '; 334 if ( 'list' != $mode ) 335 echo '( ' . $user_object->user_email . ' )'; 336 echo '<br />'; 337 } 338 if ( $blogusers_warning != '' ) 339 echo '<strong>' . $blogusers_warning . '</strong><br />'; 340 } 326 $blog_users = get_users( array( 'blog_id' => $blog['blog_id'], 'fields' => 'ID' ) ); 327 328 printf( 329 '<a href="%s">%s</a>', 330 esc_url( network_admin_url( 'site-users.php?id=' . $blog['blog_id'] ) ), 331 number_format_i18n( count( $blog_users ) ) 332 ); 333 334 unset( $blog_users ); 341 335 break; 342 336 343 337 case 'plugins':