在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:tareq1988/wordpress-settings-api-class开源软件地址:https://github.com/tareq1988/wordpress-settings-api-class开源编程语言:PHP 100.0%开源软件介绍:What is this?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 {
"require": {
"tareq1988/wordpress-settings-api-class": "dev-master"
}
} Now run:
Usage ExampleCheckout 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 = get_option( $section );
if ( isset( $options[$option] ) ) {
return $options[$option];
}
return $default;
} ScreenshotFrequently Asked QuestionsWhat 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:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论