Hide posts column for site-users. Props ocean90, see #15558

git-svn-id: https://develop.svn.wordpress.org/trunk@16573 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pete Mall 2010-11-24 19:51:36 +00:00
parent ba24fb82b1
commit 7f3b087f38
1 changed files with 12 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class WP_Users_List_Table extends WP_List_Table {
}
function get_columns() {
return array(
$c = array(
'cb' => '<input type="checkbox" />',
'username' => __( 'Username' ),
'name' => __( 'Name' ),
@ -157,15 +157,25 @@ class WP_Users_List_Table extends WP_List_Table {
'role' => __( 'Role' ),
'posts' => __( 'Posts' )
);
if ( $this->is_site_users )
unset( $c['posts'] );
return $c;
}
function get_sortable_columns() {
return array(
$c = array(
'username' => 'login',
'name' => 'name',
'email' => 'email',
'posts' => 'post_count',
);
if ( $this->is_site_users )
unset( $c['posts'] );
return $c;
}
function display_rows() {