Make WordPress Core

Changeset 16573


Ignore:
Timestamp:
11/24/2010 07:51:36 PM (16 years ago)
Author:
PeteMall
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-users-list-table.php

    r16570 r16573  
    150150
    151151        function get_columns() {
    152                 return array(
     152                $c = array(
    153153                        'cb'       => '<input type="checkbox" />',
    154154                        'username' => __( 'Username' ),
    … …  
    158158                        'posts'    => __( 'Posts' )
    159159                );
     160
     161                if ( $this->is_site_users )
     162                        unset( $c['posts'] );
     163                       
     164                return $c;
    160165        }
    161166
    162167        function get_sortable_columns() {
    163                 return array(
     168                $c = array(
    164169                        'username' => 'login',
    165170                        'name'     => 'name',
    … …  
    167172                        'posts'    => 'post_count',
    168173                );
     174               
     175                if ( $this->is_site_users )
     176                        unset( $c['posts'] );
     177
     178                return $c;
    169179        }
    170180
Note: See TracChangeset for help on using the changeset viewer.