Comment.php
1 day ago
Media.php
1 day ago
NetworkSite.php
1 day ago
NetworkUser.php
1 day ago
Post.php
1 day ago
RenderColumnTrait.php
1 day ago
Taxonomy.php
1 day ago
TotalItemsTrait.php
1 day ago
User.php
1 day ago
User.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ListTable; |
| 6 | |
| 7 | use AC\ListTable; |
| 8 | use WP_Users_List_Table; |
| 9 | |
| 10 | class User implements ListTable |
| 11 | { |
| 12 | private WP_Users_List_Table $table; |
| 13 | |
| 14 | public function __construct(WP_Users_List_Table $table) |
| 15 | { |
| 16 | $this->table = $table; |
| 17 | } |
| 18 | |
| 19 | public function render_cell(string $column_id, $row_id): string |
| 20 | { |
| 21 | return (string)apply_filters('manage_users_custom_column', '', $column_id, $row_id); |
| 22 | } |
| 23 | |
| 24 | public function render_row($id): string |
| 25 | { |
| 26 | $user = get_userdata($id); |
| 27 | |
| 28 | if (! $user) { |
| 29 | return ''; |
| 30 | } |
| 31 | |
| 32 | return (string)$this->table->single_row($user); |
| 33 | } |
| 34 | |
| 35 | } |
| 36 |