AuthorSlugFactory.php
3 months ago
CommentCountFactory.php
3 months ago
DescriptionFactory.php
3 months ago
DisplayNameFactory.php
3 months ago
FirstNameFactory.php
3 months ago
FirstPostFactory.php
3 months ago
FullNameFactory.php
3 months ago
LastNameFactory.php
3 months ago
LastPostFactory.php
3 months ago
NicknameFactory.php
3 months ago
PostCountFactory.php
3 months ago
RegisteredDateFactory.php
3 months ago
ShowToolbarFactory.php
3 months ago
UserIdFactory.php
3 months ago
UserNameFactory.php
3 months ago
UserUrlFactory.php
3 months ago
VisualEditingFactory.php
3 months ago
CommentCountFactory.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ColumnFactory\User; |
| 6 | |
| 7 | use AC; |
| 8 | use AC\Column\BaseColumnFactory; |
| 9 | use AC\FormatterCollection; |
| 10 | use AC\Setting\Config; |
| 11 | |
| 12 | class CommentCountFactory extends BaseColumnFactory |
| 13 | { |
| 14 | |
| 15 | public function get_label(): string |
| 16 | { |
| 17 | return __('Comments', 'codepress-admin-columns'); |
| 18 | } |
| 19 | |
| 20 | public function get_column_type(): string |
| 21 | { |
| 22 | return 'column-user_commentcount'; |
| 23 | } |
| 24 | |
| 25 | protected function get_formatters(Config $config): FormatterCollection |
| 26 | { |
| 27 | $formatters = parent::get_formatters($config); |
| 28 | |
| 29 | $formatters->add(new AC\Formatter\User\CommentCount()); |
| 30 | |
| 31 | return $formatters; |
| 32 | } |
| 33 | |
| 34 | } |