Comment.php
5 years ago
Media.php
5 years ago
NetworkSite.php
5 years ago
NetworkUser.php
5 years ago
Post.php
5 years ago
Taxonomy.php
5 years ago
User.php
5 years ago
WpListTableTrait.php
5 years ago
NetworkUser.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\ListTable; |
| 4 | |
| 5 | use AC\ListTable; |
| 6 | use WP_MS_Users_List_Table; |
| 7 | |
| 8 | class NetworkUser implements ListTable { |
| 9 | |
| 10 | use WpListTableTrait; |
| 11 | |
| 12 | public function __construct( WP_MS_Users_List_Table $table ) { |
| 13 | $this->table = $table; |
| 14 | } |
| 15 | |
| 16 | public function get_column_value( $column, $id ) { |
| 17 | ob_start(); |
| 18 | |
| 19 | $method = 'column_' . $column; |
| 20 | |
| 21 | if ( method_exists( $this->table, $method ) ) { |
| 22 | call_user_func( [ $this->table, $method ], get_userdata( $id ) ); |
| 23 | } else { |
| 24 | $this->table->column_default( get_userdata( $id ), $column ); |
| 25 | } |
| 26 | |
| 27 | return ob_get_clean(); |
| 28 | } |
| 29 | |
| 30 | } |