Agent.php
4 years ago
Approved.php
4 years ago
Author.php
4 years ago
AuthorAvatar.php
4 years ago
AuthorEmail.php
4 years ago
AuthorIP.php
4 years ago
AuthorName.php
4 years ago
AuthorUrl.php
4 years ago
Comment.php
4 years ago
Date.php
4 years ago
DateGmt.php
4 years ago
Excerpt.php
4 years ago
ID.php
4 years ago
Post.php
4 years ago
ReplyTo.php
4 years ago
Response.php
4 years ago
Status.php
4 years ago
Type.php
4 years ago
User.php
4 years ago
WordCount.php
4 years ago
WordCount.php
21 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 | ->set_label( __( 'Word Count', 'codepress-admin-columns' ) ); |
| 15 | } |
| 16 | |
| 17 | public function get_raw_value( $id ) { |
| 18 | return ac_helper()->string->word_count( get_comment( $id )->comment_content ); |
| 19 | } |
| 20 | |
| 21 | } |