[WordPress] 外掛分享: CMB2 Field Type: Font Awesome

首頁外掛目錄 › CMB2 Field Type: Font Awesome
WordPress 外掛 CMB2 Field Type: Font Awesome 的封面圖片
400+
安裝啟用
★★★★★
5/5 分(1 則評價)
2453 天前
最後更新
問題解決
WordPress 3.6+ v1.4 上架:2018-02-05

內容簡介

使用 Font Awesome 圖示選擇器強大的自定義 metabox 產生器 CMB2

您可以在 CMB2 函數檔案中使用作為欄位類型。新增一個欄位,設置類型為 faiconselect,並將 Font Awesome 圖標添加到選項中(請查看使用示例)。此外,該外掛使用 jQuery Font Picker 創建圖示選擇器。

使用示例

在 Github 上查看詳細說明

$cmb->add_field( array(
'name' => __( 'Select Font Awesome Icon', 'cmb' ),
'id' => $prefix . 'iconselect',
'desc' => '選擇 Font Awesome 圖示',
'type' => 'faiconselect',
'options' => array(
'fa fa-facebook' => 'fa fa-facebook',
'fa fa-500px' => 'fa fa-500px',
'fa fa-twitter' => 'fa fa-twitter'
)
) );

使用 Font Awesome 5 為例
$cmb->add_field( array(
'name' => __( 'Select Font Awesome Icon', 'cmb' ),
'id' => $prefix . 'iconselect',
'desc' => '選擇 Font Awesome 圖示',
'type' => 'faiconselect',
'options' => array(
'fab fa-facebook' => 'fa fa-facebook',
'fab fa-500px' => 'fa fa-500px',
'fab fa-twitter' => 'fa fa-twitter',
'fas fa-address-book' => 'fas fa-address-book'
),
'attributes' => array(
'faver' => 5
)
) );

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「CMB2 Field Type: Font Awesome」→ 直接安裝(推薦)

原文外掛簡介

Font Awesome icon selector for powerful custom metabox generator CMB2
You can use as field type in CMB2 function file. Add a new field, set type to faiconselect and add font awesome icons to options (look Usage for examples). Plugin uses jQuery Font Picker for creating a icon selector.
Sample Usage
Detailed instructions on Github
$cmb->add_field( array(
'name' => __( 'Select Font Awesome Icon', 'cmb' ),
'id' => $prefix . 'iconselect',
'desc' => 'Select Font Awesome icon',
'type' => 'faiconselect',
'options' => array(
'fa fa-facebook' => 'fa fa-facebook',
'fa fa-500px' => 'fa fa-500px',
'fa fa-twitter' => 'fa fa-twitter'
)
) );

Sample Usage With Font Awesome 5
$cmb->add_field( array(
'name' => __( 'Select Font Awesome Icon', 'cmb' ),
'id' => $prefix . 'iconselect',
'desc' => 'Select Font Awesome icon',
'type' => 'faiconselect',
'options' => array(
'fab fa-facebook' => 'fa fa-facebook',
'fab fa-500px' => 'fa fa-500px',
'fab fa-twitter' => 'fa fa-twitter',
'fas fa-address-book' => 'fas fa-address-book'
),
'attributes' => array(
'faver' => 5
)
) );

延伸相關外掛

文章
Filter
Apply Filters
Mastodon