[wordpress插件] Admin Form Framework管理表格框架

wordpress 插件 文章 2020-02-03 10:00 624 0 全屏看文

AI助手支持GPT4.0

评分

0

0

描述

This plugin will help you quickly set up a standard WordPress settings page for your project, be it a theme or a plugin.

此插件将帮助您快速为您的项目设置标准的WordPress设置页面,无论是主题还是插件。

That’s it!

就是这样!

Below is a “Hello World” piece of code to quickly get you an idea.

下面是一段“ Hello World”代码,可以帮助您快速理解。

It will generate a standard settings page with a checkbox, complete markup, save logic.

它将生成带有复选框,完整标记,保存逻辑的标准设置页面。

  <?php 

add_action( 'init', 'my_options_create_page', 11 );

add_action('init','my_options_create_page',11);

function my_options_create_page() { $options_page = new Aff();

函数my_options_create_page(){$ options_page = new Aff();

// Add a checkbox $options_page->add_field( array( 'name' => 'simple_checkbox', 'label' => __( 'Is this plugin awesome?', 'textdomain' ), 'type' => 'checkbox'

//添加一个复选框$ options_page-> add_field(array('name'=>'simple_checkbox','label'=> __('这个插件很棒吗?','textdomain'),'type'=>'checkbox'

, 'description' => __( 'Help your users with a nice description.', 'textdomain' ), 'section' => 'general', // Optional. Default section. You can add new ones as easily as adding a

,'description'=> __('帮助您的用户提供一个不错的描述。','textdomain'),'section'=>'general',//可选。默认部分。您可以像添加一个

field. ) );

));

// Render the page - this is mandatory $options_page->init();

//渲染页面-这是强制性的$ options_page-> init();

?>

?>

There are a zillion options plugins out there.

有不计其数的选项插件。

Why this?

为什么会这样?

All plugins will inevitably have their limitations, but Admin Form Framework is written in form of an object that can be easily extended to suit your needs.

所有插件都不可避免地会有其局限性,但是Admin Form Framework是以对象的形式编写的,可以轻松扩展以适应您的需求。

This is what we use internally at Dream Production.

这就是我们在梦想制作内部使用的方式。

Get started

开始使用

For a complete example / settings page template, open up the included my_options.php file from examples folder.

有关完整的示例/设置页面模板,请从 examples 文件夹中打开包含的my_options.php文件。

安装步骤

    1. Upload to the /wp-content/plugins/ directory
    2. 上传到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Follow the instructions to get started with your first settings page.
    6. 按照说明开始第一个设置页面。

下载地址

https://downloads.wordpress.org/plugin/admin-form-framework.zip

https://downloads.wordpress.org/plugin/admin-form-framework.zip

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Awesome Newsletter很棒的时事通讯
[wordpress插件] Contact Form 7 Syntax Highlighting联系表7语法突出显示
[wordpress插件] Agile CRM敏捷客户关系管理
[wordpress插件] Accept CryptoCurrency Payments on WooCommerce – CryptoCurrency Gateway Plugin from TheBigCoin在WooCommerce上接受CryptoCurrency付款-TheBigCoin的CryptoCurrency网关插件
[wordpress插件] Dojo (beta)道场(测试版)
随便看看
微信开放平台跟公众平台有什么区别? 3608
怎么添加小程序支付功能? 4516
教育科技公司申请微信支付被拒绝? 4798
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472