stevegrunwell/wp-admin-tabbed-settings-pages
Composer 安装命令:
composer require stevegrunwell/wp-admin-tabbed-settings-pages
包简介
A polyfill for Trac #51086, bringing tabbed settings pages into WP-Admin.
README 文档
README
This package contains a polyfill for WordPress Core Trac ticket #51086, wherein a standard for tabbed settings pages within WP-Admin has been proposed.
The proposal centers around a new function as part of the Settings API: do_tabbed_settings_sections(), which is identical to do_settings_sections() except that each section is rendered in a separate tab.
As a bonus, the included script respects the URL hash, enabling browser history for tabs as well as the ability to link directly to specific tabs!
Best of all, you don't have to wait for WordPress Core to accept the change to start using it today, as this package contains the same code (and is maintained by the person who submitted the Trac ticket). This version of the code is even designed to step aside if it detects the function within WordPress core sometime in the future!
Installation
To run this polyfill as a stand-alone WordPress plugin, grab the latest zip file and install it as you would any other WordPress plugin.
If you'd rather bundle this as a dependency in another plugin, you may load it via Composer:
$ composer require stevegrunwell/wp-admin-tabbed-settings-pages
It's worth noting that the composer.json does not include the plugin bootstrap file in the autoloader, so it's necessary to explicitly require this file after WordPress has been loaded (such as when your plugin is loading):
// Please adjust this path as appropriate. require_once __DIR__ . '/vendor/stevegrunwell/wp-admin-tabbed-settings-pages/wp-admin-tabbed-settings-pages.php';
Usage
As long as you're leveraging the WordPress Settings API, the only change necessary is replacing your call to do_settings_sections($page) with do_tabbed_settings_sections($page).
For an example of how this might look, please see the WP-Admin Tabbed Settings Pages demo plugin attached to the Trac ticket.
stevegrunwell/wp-admin-tabbed-settings-pages 适用场景与选型建议
stevegrunwell/wp-admin-tabbed-settings-pages 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 46.25k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2020 年 08 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 stevegrunwell/wp-admin-tabbed-settings-pages 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stevegrunwell/wp-admin-tabbed-settings-pages 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 46.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2020-08-21
