Make manage_users_custom_column hook consistent between WP_(MS)?_Users_List_Table. Fixes #14562
git-svn-id: http://svn.automattic.com/wordpress/trunk@16354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
40b2c5b6c5
commit
e496292ae5
|
@ -159,6 +159,12 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||||
list( $columns, $hidden ) = $this->get_column_info();
|
list( $columns, $hidden ) = $this->get_column_info();
|
||||||
|
|
||||||
foreach ( $columns as $column_name => $column_display_name ) :
|
foreach ( $columns as $column_name => $column_display_name ) :
|
||||||
|
$style = '';
|
||||||
|
if ( in_array( $column_name, $hidden ) )
|
||||||
|
$style = ' style="display:none;"';
|
||||||
|
|
||||||
|
$attributes = "$class$style";
|
||||||
|
|
||||||
switch ( $column_name ) {
|
switch ( $column_name ) {
|
||||||
case 'cb': ?>
|
case 'cb': ?>
|
||||||
<th scope="row" class="check-column">
|
<th scope="row" class="check-column">
|
||||||
|
@ -248,7 +254,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: ?>
|
default: ?>
|
||||||
<td><?php do_action( 'manage_users_custom_column', $column_name, $user->ID ); ?></td>
|
<td><?php echo apply_filters( 'manage_users_custom_column', '', $column_name, $user->ID ); ?></td>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,9 +214,10 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||||
$edit = '<strong>' . $user_object->user_login . '</strong>';
|
$edit = '<strong>' . $user_object->user_login . '</strong>';
|
||||||
}
|
}
|
||||||
$role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' );
|
$role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' );
|
||||||
$r = "<tr id='user-$user_object->ID'$style>";
|
|
||||||
$avatar = get_avatar( $user_object->ID, 32 );
|
$avatar = get_avatar( $user_object->ID, 32 );
|
||||||
|
|
||||||
|
$r = "<tr id='user-$user_object->ID'$style>";
|
||||||
|
|
||||||
list( $columns, $hidden ) = $this->get_column_info();
|
list( $columns, $hidden ) = $this->get_column_info();
|
||||||
|
|
||||||
foreach ( $columns as $column_name => $column_display_name ) {
|
foreach ( $columns as $column_name => $column_display_name ) {
|
||||||
|
|
Loading…
Reference in New Issue