Acf
1 day ago
Admin
1 day ago
Ajax
1 day ago
ApplyFilter
1 day ago
Asset
1 day ago
Capabilities
1 day ago
Check
1 day ago
Collection
1 day ago
Column
1 day ago
ColumnFactories
1 day ago
ColumnFactory
1 day ago
ColumnIterator
1 day ago
ColumnRepository
1 day ago
ColumnSize
1 day ago
DI
1 day ago
DefaultColumnHandler
1 day ago
Deprecated
1 day ago
Entity
1 day ago
Exception
1 day ago
Expression
1 day ago
Form
1 day ago
Formatter
1 day ago
Helper
1 day ago
Integration
1 day ago
ListScreenRepository
1 day ago
ListTable
1 day ago
Message
1 day ago
Meta
1 day ago
Nonce
1 day ago
Notice
1 day ago
Plugin
1 day ago
Preferences
1 day ago
Promo
1 day ago
Request
1 day ago
RequestHandler
1 day ago
Response
1 day ago
Sanitize
1 day ago
Service
1 day ago
Setting
1 day ago
Settings
1 day ago
Storage
1 day ago
Table
1 day ago
TableIdsFactory
1 day ago
TableScreen
1 day ago
TableScreenFactory
1 day ago
ThirdParty
1 day ago
Type
1 day ago
Value
1 day ago
View
1 day ago
Acf.php
1 day ago
AdminColumns.php
1 day ago
ArrayIterator.php
1 day ago
Capabilities.php
1 day ago
Collection.php
1 day ago
CollectionFormatter.php
1 day ago
Column.php
1 day ago
ColumnCollection.php
1 day ago
ColumnFactoryCollectionFactory.php
1 day ago
ColumnFactoryDefinitionCollection.php
1 day ago
ColumnGroups.php
1 day ago
ColumnIterator.php
1 day ago
ColumnNamesTrait.php
1 day ago
ColumnRepository.php
1 day ago
ColumnTypeRepository.php
1 day ago
Config.php
1 day ago
DateFormats.php
1 day ago
DefaultColumnHandler.php
1 day ago
Expirable.php
1 day ago
Formatter.php
1 day ago
FormatterCollection.php
1 day ago
Helper.php
1 day ago
ListScreen.php
1 day ago
ListScreenCollection.php
1 day ago
ListScreenRepository.php
1 day ago
ListScreenRepositoryWritable.php
1 day ago
ListTable.php
1 day ago
ListTableFactory.php
1 day ago
Loader.php
1 day ago
Message.php
1 day ago
MetaType.php
1 day ago
Middleware.php
1 day ago
OpCacheInvalidateTrait.php
1 day ago
PluginActionLinks.php
1 day ago
PluginActionUpgrade.php
1 day ago
PostType.php
1 day ago
PostTypeRepository.php
1 day ago
Registerable.php
1 day ago
Registry.php
1 day ago
Renderable.php
1 day ago
Request.php
1 day ago
RequestAjaxHandler.php
1 day ago
RequestAjaxHandlers.php
1 day ago
RequestAjaxParser.php
1 day ago
RequestHandler.php
1 day ago
RequestHandlerFactory.php
1 day ago
Screen.php
1 day ago
Services.php
1 day ago
TableIdsFactory.php
1 day ago
TableScreen.php
1 day ago
TableScreenFactory.php
1 day ago
Taxonomy.php
1 day ago
Transient.php
1 day ago
TypedArrayIterator.php
1 day ago
View.php
1 day ago
WooCommerce.php
1 day ago
WpListTableFactory.php
1 day ago
WpListTableFactory.php
72 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC; |
| 6 | |
| 7 | use WP_Comments_List_Table; |
| 8 | use WP_Media_List_Table; |
| 9 | use WP_MS_Sites_List_Table; |
| 10 | use WP_MS_Users_List_Table; |
| 11 | use WP_Posts_List_Table; |
| 12 | use WP_Terms_List_Table; |
| 13 | use WP_Users_List_Table; |
| 14 | |
| 15 | class WpListTableFactory |
| 16 | { |
| 17 | public static function create_post_table(string $screen_id): WP_Posts_List_Table |
| 18 | { |
| 19 | require_once(ABSPATH . 'wp-admin/includes/class-wp-posts-list-table.php'); |
| 20 | |
| 21 | return new WP_Posts_List_Table(['screen' => $screen_id]); |
| 22 | } |
| 23 | |
| 24 | public static function create_user_table(string $screen_id): WP_Users_List_Table |
| 25 | { |
| 26 | require_once(ABSPATH . 'wp-admin/includes/class-wp-users-list-table.php'); |
| 27 | |
| 28 | return new WP_Users_List_Table(['screen' => $screen_id]); |
| 29 | } |
| 30 | |
| 31 | public static function create_comment_table(string $screen_id): WP_Comments_List_Table |
| 32 | { |
| 33 | require_once(ABSPATH . 'wp-admin/includes/class-wp-comments-list-table.php'); |
| 34 | |
| 35 | $table = new WP_Comments_List_Table(['screen' => $screen_id]); |
| 36 | |
| 37 | // Since 4.4 the `floated_admin_avatar` filter is added in the constructor of the `\WP_Comments_List_Table` class. |
| 38 | remove_filter('comment_author', [$table, 'floated_admin_avatar']); |
| 39 | |
| 40 | return $table; |
| 41 | } |
| 42 | |
| 43 | public static function create_media_table(string $screen_id): WP_Media_List_Table |
| 44 | { |
| 45 | require_once(ABSPATH . 'wp-admin/includes/class-wp-media-list-table.php'); |
| 46 | |
| 47 | return new WP_Media_List_Table(['screen' => $screen_id]); |
| 48 | } |
| 49 | |
| 50 | public static function create_taxonomy_table(string $screen_id): WP_Terms_List_Table |
| 51 | { |
| 52 | require_once(ABSPATH . 'wp-admin/includes/class-wp-terms-list-table.php'); |
| 53 | |
| 54 | return new WP_Terms_List_Table(['screen' => $screen_id]); |
| 55 | } |
| 56 | |
| 57 | public static function create_network_user_table(string $screen_id): WP_MS_Users_List_Table |
| 58 | { |
| 59 | require_once(ABSPATH . 'wp-admin/includes/class-wp-ms-users-list-table.php'); |
| 60 | |
| 61 | return new WP_MS_Users_List_Table(['screen' => $screen_id]); |
| 62 | } |
| 63 | |
| 64 | public static function create_network_site_table(string $screen_id): WP_MS_Sites_List_Table |
| 65 | { |
| 66 | require_once(ABSPATH . 'wp-admin/includes/class-wp-ms-sites-list-table.php'); |
| 67 | |
| 68 | return new WP_MS_Sites_List_Table(['screen' => $screen_id]); |
| 69 | } |
| 70 | |
| 71 | } |
| 72 |