Agent.php
5 years ago
Approved.php
5 years ago
Author.php
5 years ago
AuthorAvatar.php
5 years ago
AuthorEmail.php
5 years ago
AuthorIP.php
5 years ago
AuthorName.php
5 years ago
AuthorUrl.php
5 years ago
Comment.php
5 years ago
Date.php
5 years ago
DateGmt.php
5 years ago
Excerpt.php
5 years ago
ID.php
5 years ago
Post.php
5 years ago
ReplyTo.php
5 years ago
Response.php
5 years ago
Status.php
5 years ago
Type.php
5 years ago
User.php
5 years ago
WordCount.php
5 years ago
Type.php
31 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Column\Comment; |
| 4 | |
| 5 | use AC\Column; |
| 6 | |
| 7 | /** |
| 8 | * @since 2.4.2 |
| 9 | */ |
| 10 | class Type extends Column { |
| 11 | |
| 12 | public function __construct() { |
| 13 | $this->set_type( 'column-type' ) |
| 14 | ->set_label( __( 'Type', 'codepress-admin-columns' ) ); |
| 15 | } |
| 16 | |
| 17 | public function get_value( $id ) { |
| 18 | $type = $this->get_raw_value( $id ); |
| 19 | |
| 20 | if ( ! $type ) { |
| 21 | return $this->get_empty_char(); |
| 22 | } |
| 23 | |
| 24 | return $type; |
| 25 | } |
| 26 | |
| 27 | public function get_raw_value( $id ) { |
| 28 | return get_comment( $id )->comment_type; |
| 29 | } |
| 30 | |
| 31 | } |