ID.php
12 years ago
actions.php
12 years ago
comment-count.php
12 years ago
description.php
12 years ago
first-name.php
12 years ago
last-name.php
12 years ago
nickname.php
12 years ago
post-count.php
12 years ago
registered.php
12 years ago
url.php
12 years ago
first-name.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * CPAC_Column_User_First_Name |
| 5 | * |
| 6 | * @since 2.0.0 |
| 7 | */ |
| 8 | class CPAC_Column_User_First_Name extends CPAC_Column { |
| 9 | |
| 10 | function __construct( $storage_model ) { |
| 11 | |
| 12 | // define properties |
| 13 | $this->properties['type'] = 'column-first_name'; |
| 14 | $this->properties['label'] = __( 'First name', 'cpac' ); |
| 15 | |
| 16 | parent::__construct( $storage_model ); |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * @see CPAC_Column::get_value() |
| 21 | * @since 2.0.0 |
| 22 | */ |
| 23 | function get_value( $user_id ) { |
| 24 | |
| 25 | $userdata = get_userdata( $user_id ); |
| 26 | |
| 27 | return $userdata->first_name; |
| 28 | } |
| 29 | } |