ID.php
12 years ago
actions.php
12 years ago
agent.php
12 years ago
approved.php
12 years ago
author-avatar.php
12 years ago
author-email.php
12 years ago
author-ip.php
12 years ago
author-url.php
12 years ago
author.php
12 years ago
date-gmt.php
12 years ago
date.php
12 years ago
excerpt.php
12 years ago
reply-to.php
12 years ago
word-count.php
12 years ago
date.php
33 lines
| 1 | <?php |
| 2 | /** |
| 3 | * CPAC_Column_Comment_Date |
| 4 | * |
| 5 | * @since 2.0.0 |
| 6 | */ |
| 7 | class CPAC_Column_Comment_Date extends CPAC_Column { |
| 8 | |
| 9 | function __construct( $storage_model ) { |
| 10 | |
| 11 | $this->properties['type'] = 'column-date'; |
| 12 | $this->properties['label'] = __( 'Date', 'cpac' ); |
| 13 | |
| 14 | parent::__construct( $storage_model ); |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * @see CPAC_Column::get_value() |
| 19 | * @since 2.0.0 |
| 20 | */ |
| 21 | function get_value( $id ) { |
| 22 | |
| 23 | $comment = get_comment( $id ); |
| 24 | |
| 25 | $value = sprintf( __( 'Submitted on <a href="%1$s">%2$s at %3$s</a>' ), |
| 26 | esc_url( get_comment_link( $id ) ), |
| 27 | $this->get_date( $comment->comment_date ), |
| 28 | $this->get_time( $comment->comment_date ) |
| 29 | ); |
| 30 | |
| 31 | return "<div class='submitted-on'>{$value}</div>"; |
| 32 | } |
| 33 | } |