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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
PeteMall 2010-11-24 19:51:36 +00:00
parent b0d6453462
commit 9855ee1aa2
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() {