clearcode/wordpress-settings 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

clearcode/wordpress-settings

Composer 安装命令:

composer require clearcode/wordpress-settings

包简介

WordPress Settings library by Clearcode.

README 文档

README

WordPress Settings library by Clearcode.

Installation

$ composer require clearcode/wordpress-settings
require __DIR__ . '/vendor/autoload.php';

new Settings( [
    'option_name' => [
        'group' => 'option_group', // optional
        'type' => 'string', // optional
        'description' => 'setting description', // optional
        'rest' => false, // optional
        'pages' => [
            'page_slug' => [
                'title' => 'page title',
                'capability' => 'manage_options', // optional
                'menu' => [
                    'title' => 'menu title',
                    'icon' => 'dashicons-admin-plugins',
                    'position' => null,
                    'parent' => 'options-general.php'
                ],
                'tabs' => [
                    'tab_1' => [
                        'title' => 'tab title',
                        'sections' => [
                            'section_1' => [
                                'title' => 'section title',
                                'render' => [
                                    'template' => 'section', // template file path
                                    'args' => [ 
                                        'content' => 'section description'
                                    ]
                                ],
                                'fields' => [
                                    'field_1' => [
                                        'title' => 'field title',
                                        'default' => 'default value',
                                        'sanitize' => function( $value ) { return $value; }, // callback function
                                        'render' => [
                                            'template' => 'input', // supported templates: input, textarea, select
                                            'args' => [
                                                'atts' => [
                                                    'type' => 'text'
                                                ],
                                                'before' => 'before text',
                                                'after' => 'after text',
                                                'description' => 'description text'
                                            ]
                                        ]
                                    ]
                                ]
                            ]
                        ]
                    ]
                ]
            ]
        ]
    ]
] );

License

GPL3.0+ see LICENSE.txt and AUTHORS.txt

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2021-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固