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
WordCount.php
23 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Column\Comment; |
| 4 | |
| 5 | use AC\Column; |
| 6 | |
| 7 | /** |
| 8 | * @since 2.0 |
| 9 | */ |
| 10 | class WordCount extends Column { |
| 11 | |
| 12 | public function __construct() { |
| 13 | $this->set_type( 'column-word_count' ); |
| 14 | $this->set_label( __( 'Word Count', 'codepress-admin-columns' ) ); |
| 15 | } |
| 16 | |
| 17 | public function get_raw_value( $id ) { |
| 18 | $comment = get_comment( $id ); |
| 19 | |
| 20 | return ac_helper()->string->word_count( $comment->comment_content ); |
| 21 | } |
| 22 | |
| 23 | } |