[wordpress插件] AS MetaboxAS Metabox

wordpress 插件 文章 2020-02-21 18:20 552 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

As Metabox Easy To Use WordPress Metabox Framework And More Customizable Option.

作为Metabox易于使用的WordPress Metabox Framework和更多可自定义的选项。

You Can Make Beautiful Metabox Option

您可以制作漂亮的Metabox选项

Configuration

配置

Usage as Plugin

用作插件

1. Upload ‘as-metabox‘ folder to the ‘/wp-content/plugins/’ directory or Install as a regullar WordPress plugin

1.将“ as-metabox”文件夹上传到“ / wp-content / plugins /”目录,或作为常规WordPress插件安装

Usage as Theme

用作主题

2. require_once get_template_directory_uri() .'/as-metabox/as-metabox.php';

2. require_once get_template_directory_uri()。'/ as-metabox / as-metabox.php';

After installation, you can modify and change directly metabox-config files from as-metabox/config folder or you can make another new option using wp hook

安装后,您可以直接从as-metabox / config文件夹中修改和更改metabox-config文件,也可以使用wp hook做出另一个新选择

add_action('as_metabox_init', 'your_function_name');

add_action('as_metabox_init','your_function_name');

Metabox Options

元框选项

    • Text
    • 文字

    • Url
    • 网址

    • DatePicker
    • DatePicker

    • Email
    • 电子邮件

    • Textarea
    • 文本区域

    • Checkbox
    • 复选框

    • Radio
    • 收音机

    • Select
    • 选择

    • WP Select
    • WP选择

    • Number
    • 号码

    • Icons
    • 图标

    • Group
    • Upload
    • 上传

    • WP Editor
    • WP编辑器

    • Color Picker
    • 拾色器

    • Custom Option
    • 自定义选项

    • And More Options Is Upcoming
    • 还有更多选择即将来临

    More Documentation

    更多文档

安装步骤

Usage as Plugin

用作插件

1. Upload ‘as-metabox‘ folder to the ‘/wp-content/plugins/’ directory or Install as a regullar WordPress plugin

1.将“ as-metabox”文件夹上传到“ / wp-content / plugins /”目录,或作为常规WordPress插件安装

Usage as Theme

用作主题

2. require_once get_template_directory_uri() .'/as-metabox/as-metabox.php';

2. require_once get_template_directory_uri()。'/ as-metabox / as-metabox.php';

Make a Basic MetaBox Sample

制作基本的MetaBox示例

$asmeta = new As_metabox(array(        

$ asmeta =新的As_metabox(array(        

'title' => __('Meta box demo 1', 'asm'), //MetaBox Title        

'title'=> __('Meta box demo 1','asm'),// MetaBox标题        

'id' => 'demo-id-1', //MetaBox Id Please Give An Unique Id        

'id'=>'demo-id-1',// MetaBox ID请提供一个唯一ID        

'screen' => array('post'), //MetaBox Post Type Example array('post', 'page'),        

'screen'=> array('post'),// MetaBox帖子类型示例array('post','page'),        

'context' => 'advanced', //MetaBox Post Context        

'context'=>'advanced',// MetaBox发布上下文        

'priority' => 'low' //MetaBox Post Priority    

'priority'=>'low'// MetaBox发布优先级    

));

));

$asmeta->add_section(array(            

$ asmeta-> add_section(array(            

'title' => __('Text fields', 'asm'),            

'title'=> __('文本字段','asm'),            

'id' => 'section-1',            

'id'=>'section-1',            

'icon' => 'fa-text-width',            

'icon'=>'fa-text-width',            

'fields' => array(                                

'fields'=>数组(                                

array(                                    

数组(                                    

'id' => 'text-field', //Option Id Please Give An Unique Id                                    

'id'=>'text-field',//选项ID请提供唯一的ID                                    

'title'=> __('Text Field', 'asm'), //Option Id Title                                    

'title'=> __('Text Field','asm'),//选项ID标题                                    

'desc' => __('Text Field Demo', 'asm'), //Option Id Description                                    

'desc'=> __('Text Field Demo','asm'),//选项ID说明                                    

'type' => 'text', //Option Id Type                                    

'type'=>'text',//选项ID类型                                    

'default' => 'text', //Default Option Value                                

'default'=>'text',//默认选项值                                

)                            

)                            

)                        

)                        

)                    

)                    

);

);

下载地址
https://downloads.wordpress.org/plugin/as-metabox.zip
-EOF-

AI助手支持GPT4.0