ID.php
10 years ago
actions.php
10 years ago
agent.php
10 years ago
approved.php
10 years ago
author-avatar.php
10 years ago
author-email.php
10 years ago
author-ip.php
10 years ago
author-name.php
10 years ago
author-url.php
10 years ago
author.php
10 years ago
date-gmt.php
10 years ago
date.php
10 years ago
excerpt.php
10 years ago
post.php
10 years ago
reply-to.php
10 years ago
type.php
10 years ago
user.php
10 years ago
word-count.php
10 years ago
approved.php
37 lines
| 1 | <?php |
| 2 | /** |
| 3 | * CPAC_Column_Comment_Approved |
| 4 | * |
| 5 | * @since 2.0 |
| 6 | */ |
| 7 | class CPAC_Column_Comment_Approved extends CPAC_Column { |
| 8 | |
| 9 | /** |
| 10 | * @see CPAC_Column::init() |
| 11 | * @since 2.2.1 |
| 12 | */ |
| 13 | public function init() { |
| 14 | |
| 15 | parent::init(); |
| 16 | |
| 17 | // Properties |
| 18 | $this->properties['type'] = 'column-approved'; |
| 19 | $this->properties['label'] = __( 'Approved', 'codepress-admin-columns' ); |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * @see CPAC_Column::get_value() |
| 24 | * @since 2.0 |
| 25 | */ |
| 26 | public function get_value( $id ) { |
| 27 | return $this->get_raw_value( $id ) ? $this->get_asset_image( 'checkmark.png' ) : $this->get_asset_image( 'no.png' ); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @since 2.4.2 |
| 32 | */ |
| 33 | public function get_raw_value( $id ) { |
| 34 | $comment = get_comment( $id ); |
| 35 | return $comment->comment_approved; |
| 36 | } |
| 37 | } |