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