twindigital/wordpress-settings-api-class
Composer 安装命令:
composer require twindigital/wordpress-settings-api-class
包简介
WordPress settings API Abstraction Class
关键字:
README 文档
README
It's a PHP class wrapper for handling WordPress Settings API. Gives a very handy way to build theme or plugins option panel.
Package Installation (via Composer)
To install this package, edit your composer.json file:
{ "require": { "tareq1988/wordpress-settings-api-class": "dev-master" } }
Now run:
$ composer install
Usage Example
Checkout the examples folder for OOP and procedural example. They were called in plugin.php file.
A detailed tutorial can be found here.
Retrieving saved options
/** * Get the value of a settings field * * @param string $option settings field name * @param string $section the section name this field belongs to * @param string $default default text if it's not found * * @return mixed */ function prefix_get_option( $option, $section, $default = '' ) { $options = getOption( $section ); if ( isset( $options[$option] ) ) { return $options[$option]; } return $default; }
Screenshot
Frequently Asked Questions
What this plugin for?
It's mainly a plugin that demonstrates the Settings API PHP class
Whats the facility?
A plugin or theme developer can build their options panel with Settings API easily
What is Settings API ?
Settings API is a functionality from WordPress that helps developers to save their options data very easily and securely. More about Settings API.
Changelog:
v1.3 (27 September, 2016)
------------------------
- [new] Placeholder support for text and textarea input
- [new] min, max and step support for number field
- [fix] Empty multicheck saving warning
- [improved] Don't show the navigation if only one section exists
v1.1 (23 April, 2015)
------------------------
- [new] Folder structure updated
- [new] composer support added
- [new] Number field added
- [new] URL field added
- [improved] wysiwyg field responsive support. Allow to pass options to wp_editor
- [new] WP Media uploader added
v1.0 (16 July, 2014)
------------------------
- [new] color, password and wysiwyg example added on plugin settings
- [new] Color Picker added
- [improved] Allow to set description for section
- Some other old fixes ;)
twindigital/wordpress-settings-api-class 适用场景与选型建议
twindigital/wordpress-settings-api-class 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.05k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 05 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「wp」 「settings-api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 twindigital/wordpress-settings-api-class 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 twindigital/wordpress-settings-api-class 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 twindigital/wordpress-settings-api-class 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
WordPress settings API Abstraction Class
WordPress settings api abstraction class
~ Lightweight, Flexible & Rapid WP Development Framework ~
Must-use plugin integrating WordPress with the Upsun platform: environment awareness, router-cache friendliness, safe preview clones, deploy migrations, Site Health checks, and a wp upsun CLI command.
WordPress settings API Abstraction Class
WordPress settings API Abstraction Class
统计信息
- 总下载量: 2.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPLv2
- 更新时间: 2018-05-30
