AuthorPostUrl.php
1 day ago
CommentCount.php
1 day ago
FirstPost.php
1 day ago
FullName.php
1 day ago
HasRichEditing.php
1 day ago
LastPost.php
1 day ago
Meta.php
1 day ago
PostCount.php
1 day ago
PostCountOriginal.php
1 day ago
Property.php
1 day ago
Roles.php
1 day ago
ShowToolbar.php
1 day ago
TranslatedRoles.php
1 day ago
UserFilteredPostLink.php
1 day ago
UserLink.php
1 day ago
UserName.php
1 day ago
PostCountOriginal.php
20 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Formatter\User; |
| 6 | |
| 7 | use AC\Formatter; |
| 8 | use AC\Type\Value; |
| 9 | |
| 10 | class PostCountOriginal implements Formatter |
| 11 | { |
| 12 | public function format(Value $value) |
| 13 | { |
| 14 | return $value->with_value( |
| 15 | count_user_posts($value->get_id()) |
| 16 | ); |
| 17 | } |
| 18 | |
| 19 | } |
| 20 |