mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
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:
parent
ba24fb82b1
commit
7f3b087f38
@ -149,7 +149,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_columns() {
|
function get_columns() {
|
||||||
return array(
|
$c = array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'username' => __( 'Username' ),
|
'username' => __( 'Username' ),
|
||||||
'name' => __( 'Name' ),
|
'name' => __( 'Name' ),
|
||||||
@ -157,15 +157,25 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||||||
'role' => __( 'Role' ),
|
'role' => __( 'Role' ),
|
||||||
'posts' => __( 'Posts' )
|
'posts' => __( 'Posts' )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( $this->is_site_users )
|
||||||
|
unset( $c['posts'] );
|
||||||
|
|
||||||
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_sortable_columns() {
|
function get_sortable_columns() {
|
||||||
return array(
|
$c = array(
|
||||||
'username' => 'login',
|
'username' => 'login',
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'email' => 'email',
|
'email' => 'email',
|
||||||
'posts' => 'post_count',
|
'posts' => 'post_count',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( $this->is_site_users )
|
||||||
|
unset( $c['posts'] );
|
||||||
|
|
||||||
|
return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_rows() {
|
function display_rows() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user