thoughtful-web/settings-page-wp 问题修复 & 功能扩展

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

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

thoughtful-web/settings-page-wp

Composer 安装命令:

composer require thoughtful-web/settings-page-wp

包简介

WordPress Settings page generator and validator released as free open source software under GNU GPL-2.0+ License

README 文档

README

This PHP library provides a quick, easy way to add a settings page to your plugin or theme. One configuration file defines both your settings and the page that manages them.

Table of Contents

  1. Features
  2. Requirements
  3. Quick Start
  4. Documentation
  5. Contributing

Features

  1. Settings page generation from a configuration file (*.php or *.json).
  2. Validation on the server by default.
  3. No external libraries beyond WordPress's Iris library for color fields.
  4. Supports these form field types:
    1. Checkboxes
    2. Color
    3. Email
    4. Number
    5. Phone
    6. Radio
    7. Select
    8. Text
    9. Textarea
    10. URL
    11. WP Editor

Requirements

System Requirements

  1. WordPress 5.4 and above.
  2. PHP 7.3.5 and above.

Installation Requirements

If you are familiar with the command line, you may install it using Composer or Git. Otherwise, you may download a release from Github.

In any case, this library must exist two directory levels below the plugin or theme's root directory. Example: ./vendor/thoughtful-web/settings-page-wp/.

Quick Start

Note: For full specification details on the configuration file values and other possible locations for a configuration file, see here: docs/config-file.md

Step 1

Download the composer module.

$ composer require thoughtful-web/settings-page-wp

Step 2
Include the library in your plugin or theme using the Composer autoloader:

require __DIR__ . '/vendor/autoload.php;

new \ThoughtfulWeb\SettingsPageWP\Page();

Step 3
Copy the example configuration file to your plugin or theme's directory at ./config/thoughtful-web/settings.php.

Step 4
Visit your new settings page at https://your-domain.com/wp-admin/admin.php?page=thoughtful-settings and fill it in as you wish.

Step 5
Retrieve an option from the database using WordPress's get_option() function:

$the_option = get_option( 'unique_text_field' );

Documentation

  1. Configuration File Reference
  2. Field Configuration Reference
  3. Action and Filter Reference
  4. Roadmap
  5. WordPress Developer Reference: Options API

Contributing

I welcome questions and discussion and have opened up Github's features to create a space for this: https://github.com/thoughtful-web/settings-page-wp/discussions. If you find an issue, please report it here: https://github.com/thoughtful-web/settings-page-wp/issues. I am currently only accepting pull requests for security improvements. Please see the contribution guidelines for details.

Back to top

Free open source software under the GNU GPL-2.0+ License.
Copyright Zachary Kendall Watkins 2021-2022.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2022-01-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固