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
registered.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * CPAC_Column_User_Registered |
| 5 | * |
| 6 | * @since 2.0.0 |
| 7 | */ |
| 8 | class CPAC_Column_User_Registered extends CPAC_Column { |
| 9 | |
| 10 | function __construct( $storage_model ) { |
| 11 | |
| 12 | // define properties |
| 13 | $this->properties['type'] = 'column-user_registered'; |
| 14 | $this->properties['label'] = __( 'Registered', 'cpac' ); |
| 15 | |
| 16 | $this->options['date_format'] = ''; |
| 17 | |
| 18 | parent::__construct( $storage_model ); |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * @see CPAC_Column::get_value() |
| 23 | * @since 2.0.0 |
| 24 | */ |
| 25 | function get_value( $user_id ) { |
| 26 | |
| 27 | $userdata = get_userdata( $user_id ); |
| 28 | |
| 29 | return $this->get_date( $userdata->user_registered, $this->options->date_format ); |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * @see CPAC_Column::display_settings() |
| 34 | * @since 2.0.0 |
| 35 | */ |
| 36 | function display_settings() { |
| 37 | |
| 38 | $this->display_field_date_format(); |
| 39 | } |
| 40 | } |