定制 alexrah/wp-admin-settings 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alexrah/wp-admin-settings

最新稳定版本:2.2.0

Composer 安装命令:

composer require alexrah/wp-admin-settings

包简介

Helper Class to create Wordpress Admin settings panels

README 文档

README

Helper class to create wp-admin setting dashboards

Install with Composer

composer require alexrah/wp-admin-settings

Usage

Initialize and configure options

use WpAdminSettings\WpAdminSettings;

const OPTION_NAME = 'wp_option_name';

$oSettings = new WpAdminSettings([
	'label' => 'Option Panel Heading',
	'options_name' => OPTION_NAME,
	'capability' => 'update_themes'
]);

$oSettings->set_option(['name' => 'single_option_name','label' => 'Paypal Client ID','required' => true]);

$oSettings->create();

retrieve single option

WpAdminSettings\WpAdminSettings::get_stored_option(OPTION_NAME,'single_option_name');

retrieve all options

WpAdminSettings\WpAdminSettings::get_stored_option(OPTION_NAME);

Changelog

Version 2.0.0

  • PHP8 ready
  • remove external deps
  • update code to make it more generic

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-26