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