CommentCount.php
8 years ago
Description.php
8 years ago
DisplayName.php
8 years ago
Email.php
8 years ago
FirstName.php
8 years ago
ID.php
8 years ago
LastName.php
8 years ago
Name.php
8 years ago
Nickname.php
8 years ago
PostCount.php
8 years ago
Posts.php
8 years ago
Registered.php
8 years ago
RichEditing.php
8 years ago
Role.php
8 years ago
ShowToolbar.php
8 years ago
Url.php
8 years ago
Username.php
8 years ago
CommentCount.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | /** |
| 8 | * @since 2.0 |
| 9 | */ |
| 10 | class AC_Column_User_CommentCount extends AC_Column { |
| 11 | |
| 12 | public function __construct() { |
| 13 | $this->set_type( 'column-user_commentcount' ); |
| 14 | $this->set_label( __( 'Comment Count', 'codepress-admin-columns' ) ); |
| 15 | } |
| 16 | |
| 17 | public function get_raw_value( $user_id ) { |
| 18 | return get_comments( array( |
| 19 | 'user_id' => $user_id, |
| 20 | 'count' => true, |
| 21 | 'orderby' => false, |
| 22 | ) ); |
| 23 | } |
| 24 | |
| 25 | } |
| 26 |