x-wp/wc-data-type-admin
最新稳定版本:v1.0.3
Composer 安装命令:
composer require x-wp/wc-data-type-admin
包简介
README 文档
README
WC Data Type Admin
Admin list-page utilities for WooCommerce data types
This library provides admin list-page and list-table utilities for custom WooCommerce data types defined with x-wp/wc-data-type. Define a data type once, then get a consistent admin listing experience with minimal boilerplate.
Key Features
- List page handling: Register admin pages for custom data types with
List_Page_Handler. - WooCommerce-style list tables: Extend
List_Tablefor a familiarWP_List_Tableworkflow tuned for WooCommerce objects. - Shared mixins: Reusable list-table behaviors via
src/Mixins/*. - Legacy compatibility: Wrappers (
XWC_Data_List_Page,XWC_Data_List_Table) keep existing consumers working. - WordPress-native integration: Designed for plugin code already built around WordPress and WooCommerce lifecycles.
Installation
You can install this package via Composer:
composer require x-wp/wc-data-type-admin
Tip
We recommend using automattic/jetpack-autoloader with this package to reduce autoloading conflicts in WordPress environments.
Package Structure
src/List_Page_Handler.php: admin page handler with DI-based table resolutionsrc/List_Table.php: base table implementation shared by legacy and new flowssrc/Mixins/*: shared list-table behaviorssrc/Core/*: legacy compatibility wrapperstemplates/html-admin-page-edsl.php: shared admin page template
Testing
Regression checks:
php tests/regressions.php
Static analysis:
php -d memory_limit=1G vendor/bin/phpstan analyse --debug
Note
The regression script is intentionally lightweight and does not require a full WordPress test bootstrap. PHPStan is configured conservatively for this library; in constrained environments, --debug is the verified non-parallel invocation path.
Documentation
For package-specific usage, start with the public entrypoints:
XWC\Data\Admin\List_Page_HandlerXWC\Data\Admin\List_TableXWC_Data_List_Page(legacy)XWC_Data_List_Table(legacy)
Additional project information is available in the repository.
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2024-12-13