ID.php
12 years ago
actions.php
12 years ago
comment-count.php
12 years ago
description.php
12 years ago
first-name.php
12 years ago
last-name.php
12 years ago
nickname.php
12 years ago
post-count.php
12 years ago
registered.php
12 years ago
url.php
12 years ago
comment-count.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * CPAC_Column_User_Comment_Count |
| 5 | * |
| 6 | * @since 2.0.0 |
| 7 | */ |
| 8 | class CPAC_Column_User_Comment_Count extends CPAC_Column { |
| 9 | |
| 10 | function __construct( $storage_model ) { |
| 11 | |
| 12 | // define properties |
| 13 | $this->properties['type'] = 'column-user_commentcount'; |
| 14 | $this->properties['label'] = __( 'Comment Count' ); |
| 15 | |
| 16 | parent::__construct( $storage_model ); |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * @see CPAC_Column::get_value() |
| 21 | * @since 2.0.0 |
| 22 | */ |
| 23 | function get_value( $user_id ) { |
| 24 | |
| 25 | $value = get_comments( array( |
| 26 | 'user_id' => $user_id, |
| 27 | 'count' => true |
| 28 | )); |
| 29 | |
| 30 | return $value; |
| 31 | } |
| 32 | } |