[wordpress插件] CMB2 Field Type: Font AwesomeCMB2字段类型:很棒的字体

wordpress 插件 文章 2020-03-26 05:20 524 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Font Awesome icon selector for powerful custom metabox generator CMB2

强大的自定义metabox生成器的图标选择器CMB2

>

>

You can use as field type in CMB2 function file.

您可以在CMB2功能文件中用作字段类型。

Add a new field, set type to faiconselect and add font awesome icons to options (look Usage for examples).

添加一个新字段,将类型设置为 faiconselect ,并将字体真棒图标添加到选项中(有关示例,请参见用法)。

Plugin uses jQuery Font Picker for creating a icon selector.

插件使用 jQuery字体选择器来创建图标选择器。

Sample Usage

样品用量

Detailed instructions on Github

关于 Github 的详细说明

$cmb->add_field( array(    

  $ cmb-> add_field(array(    

'name' => __( 'Select Font Awesome Icon', 'cmb' ),    

'名称'=> __('选择字体真棒图标','cmb'),    

'id' => $prefix .

'id'=> $ prefix。

'iconselect',    

'iconselect',    

'desc' => 'Select Font Awesome icon',    

'desc'=>'选择真棒字体图标',    

'type' => 'faiconselect',    

'type'=>'faiconselect',    

'options' => array(    

'选项'=>数组(    

'fa fa-facebook' => 'fa fa-facebook',    

'fa fa-facebook'=>'fa fa-facebook',    

'fa fa-500px' => 'fa fa-500px',    

'fa fa-500px'=>'fa fa-500px',    

'fa fa-twitter' => 'fa fa-twitter'    

'fa fa-twitter'=>'fa fa-twitter'    

)

) );

));

Sample Usage With Font Awesome 5

字体真棒5的示例用法

$cmb->add_field( array(    

  $ cmb-> add_field(array(    

'name' => __( 'Select Font Awesome Icon', 'cmb' ),    

'名称'=> __('选择字体真棒图标','cmb'),    

'id' => $prefix .

'id'=> $ prefix。

'iconselect',    

'iconselect',    

'desc' => 'Select Font Awesome icon',    

'desc'=>'选择真棒字体图标',    

'type' => 'faiconselect',    

'type'=>'faiconselect',    

'options' => array(        

'选项'=>数组(        

'fab fa-facebook' => 'fa fa-facebook',        

'fab fa-facebook'=>'fa fa-facebook',        

'fab fa-500px' => 'fa fa-500px',        

'fab fa-500px'=>'fa fa-500px',        

'fab fa-twitter' => 'fa fa-twitter',        

'fab fa-twitter'=>'fa fa-twitter',        

'fas fa-address-book' => 'fas fa-address-book'    

'fas fa-address-book'=>'fas fa-address-book'    

),    

),    

'attributes' => array(        

'属性'=>数组(        

'faver' => 5    

'faver'=> 5    

)

) );

));

安装步骤

    1. Upload cmb2-field-type-font-awesome folder to the /wp-content/plugins/ directory
    2. cmb2-field-type-font-awesome 文件夹上载到 / wp-content / plugins / 目录

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

下载地址
https://downloads.wordpress.org/plugin/cmb2-field-type-font-awesome.zip
-EOF-

AI助手支持GPT4.0