CommentCount.php
8 years ago
Description.php
8 years ago
DisplayName.php
8 years ago
Email.php
8 years ago
FirstName.php
8 years ago
ID.php
8 years ago
LastName.php
8 years ago
Name.php
8 years ago
Nickname.php
8 years ago
PostCount.php
8 years ago
Posts.php
8 years ago
Registered.php
8 years ago
RichEditing.php
8 years ago
Role.php
8 years ago
ShowToolbar.php
8 years ago
Url.php
8 years ago
Username.php
8 years ago
LastName.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | /** |
| 8 | * @since 2.0 |
| 9 | */ |
| 10 | class AC_Column_User_LastName extends AC_Column_Meta { |
| 11 | |
| 12 | public function __construct() { |
| 13 | $this->set_type( 'column-last_name' ); |
| 14 | $this->set_label( __( 'Last name', 'codepress-admin-columns' ) ); |
| 15 | } |
| 16 | |
| 17 | public function get_meta_key() { |
| 18 | return 'last_name'; |
| 19 | } |
| 20 | |
| 21 | public function get_value( $user_id ) { |
| 22 | $value = $this->get_raw_value( $user_id ); |
| 23 | |
| 24 | if ( ! $value ) { |
| 25 | return $this->get_empty_char(); |
| 26 | } |
| 27 | |
| 28 | return $value; |
| 29 | } |
| 30 | |
| 31 | public function get_raw_value( $user_id ) { |
| 32 | return $this->get_meta_value( $user_id, $this->get_meta_key() ); |
| 33 | } |
| 34 | |
| 35 | } |
| 36 |