Ticket #14579: 14579.network.users.fix.patch
File 14579.network.users.fix.patch, 5.8 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/class-wp-ms-sites-list-table.php
310 310 break; 311 311 312 312 case 'plugins': ?> 313 314 echo "<td valign='top'class='$column_name column-$column_name'$style>";315 316 317 <?php } ?>318 <?phpbreak;313 <?php if ( has_filter( 'wpmublogsaction' ) ) { 314 echo "<td valign='top' class='$column_name column-$column_name'$style>"; 315 do_action( 'wpmublogsaction', $blog['blog_id'] ); ?> 316 </td> 317 <?php } 318 break; 319 319 320 320 default: 321 321 echo "<td class='$column_name column-$column_name'$style>"; -
wp-admin/includes/class-wp-ms-themes-list-table.php
334 334 335 335 echo "</div></td>"; 336 336 break; 337 break; 337 338 338 default: 339 339 echo "<td class='$column_name column-$column_name'$style>"; 340 340 do_action( 'manage_themes_custom_column', $column_name, $theme_key, $theme ); -
wp-admin/includes/class-wp-ms-users-list-table.php
17 17 } 18 18 19 19 function prepare_items() { 20 global $usersearch, $role, $wpdb ;20 global $usersearch, $role, $wpdb, $mode; 21 21 22 22 $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''; 23 23 … … 55 55 if ( isset( $_REQUEST['order'] ) ) 56 56 $args['order'] = $_REQUEST['order']; 57 57 58 $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode']; 59 58 60 // Query the user IDs for this page 59 61 $wp_user_search = new WP_User_Query( $args ); 60 62 … … 109 111 function get_columns() { 110 112 $users_columns = array( 111 113 'cb' => '<input type="checkbox" />', 112 ' login'=> __( 'Username' ),114 'username' => __( 'Username' ), 113 115 'name' => __( 'Name' ), 114 116 'email' => __( 'E-mail' ), 115 117 'registered' => _x( 'Registered', 'user' ), … … 122 124 123 125 function get_sortable_columns() { 124 126 return array( 125 ' login'=> 'login',127 'username' => 'login', 126 128 'name' => 'name', 127 129 'email' => 'email', 128 130 'registered' => 'id', … … 132 134 function display_rows() { 133 135 global $current_site, $mode; 134 136 135 $ class= '';137 $alt = ''; 136 138 $super_admins = get_super_admins(); 137 139 foreach ( $this->items as $user ) { 138 $ class = ( 'alternate' == $class) ? '' : 'alternate';140 $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; 139 141 140 142 $status_list = array( 'spam' => 'site-spammed', 'deleted' => 'site-deleted' ); 141 143 … … 145 147 } 146 148 147 149 ?> 148 <tr class="<?php echo $ class; ?>">150 <tr class="<?php echo $alt; ?>"> 149 151 <?php 150 152 151 153 list( $columns, $hidden ) = $this->get_column_info(); 152 154 153 155 foreach ( $columns as $column_name => $column_display_name ) : 156 $class = "class='$column_name column-$column_name'"; 157 154 158 $style = ''; 155 159 if ( in_array( $column_name, $hidden ) ) 156 160 $style = ' style="display:none;"'; 157 161 158 162 $attributes = "$class$style"; 163 159 164 160 165 switch ( $column_name ) { 161 166 case 'cb': ?> … … 165 170 <?php 166 171 break; 167 172 168 case 'id': ?> 169 <th valign="top" scope="row"> 170 <?php echo $user->ID ?> 171 </th> 172 <?php 173 break; 174 175 case 'login': 173 case 'username': 176 174 $avatar = get_avatar( $user->user_email, 32 ); 177 175 $edit_link = ( get_current_user_id() == $user->ID ) ? 'profile.php' : 'user-edit.php?user_id=' . $user->ID; 178 ?> 179 <td class="username column-username">176 177 echo "<td $attributes>"; ?> 180 178 <?php echo $avatar; ?><strong><a href="<?php echo esc_url( self_admin_url( $edit_link ) ); ?>" class="edit"><?php echo stripslashes( $user->user_login ); ?></a><?php 181 179 if ( in_array( $user->user_login, $super_admins ) ) 182 180 echo ' - ' . __( 'Super Admin' ); … … 197 195 <?php 198 196 break; 199 197 200 case 'name': ?> 201 <td class="name column-name"><?php echo "$user->first_name $user->last_name"; ?></td> 202 <?php 198 case 'name': 199 echo "<td $attributes>$user->first_name $user->last_name</td>"; 203 200 break; 204 201 205 case 'email': ?> 206 <td class="email column-email"><a href="mailto:<?php echo $user->user_email ?>"><?php echo $user->user_email ?></a></td> 207 <?php 202 case 'email': 203 echo "<td $attributes><a href='mailto:$user->user_email'>$user->user_email</a></td>"; 208 204 break; 209 205 210 206 case 'registered': … … 212 208 $date = 'Y/m/d'; 213 209 else 214 210 $date = 'Y/m/d \<\b\r \/\> g:i:s a'; 215 ?> 216 <td><?php echo mysql2date( $date, $user->user_registered ); ?></td> 217 <?php 211 212 echo "<td $attributes>" . mysql2date( $date, $user->user_registered ) . "</td>"; 218 213 break; 219 214 220 215 case 'blogs': 221 216 $blogs = get_blogs_of_user( $user->ID, true ); 222 ?> 223 <td> 224 <?php 217 echo "<td $attributes>"; 225 218 if ( is_array( $blogs ) ) { 226 219 foreach ( (array) $blogs as $key => $val ) { 227 220 $path = ( $val->path == '/' ) ? '' : $val->path; … … 245 238 <?php 246 239 break; 247 240 248 default: ?> 249 <td><?php echo apply_filters( 'manage_users_custom_column', '', $column_name, $user->ID ); ?></td> 250 <?php 241 default: 242 echo "<td $attributes>"; 243 echo apply_filters( 'manage_users_custom_column', '', $column_name, $user->ID ); 244 echo "</td>"; 251 245 break; 252 246 } 253 247 endforeach