這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

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
    )
) );

螢幕擷圖

  • Selector

安裝方式

  1. Upload cmb2-field-type-font-awesome folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

使用者評論

閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈CMB2 Field Type: Font Awesome〉的開發相關工作。

參與者

將〈CMB2 Field Type: Font Awesome〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

Version 1.4

  • Composer Support Added

Version 1.3-beta

  • Test for Gutenberg
  • Font Awesome 5 support added
  • Code Fixes

Version 1.2

  • Version corrections and tests
  • fontawesome & mainjs definition fix

Version 1.1

  • Group Field Problem Solved
  • Icon Selector js updated to latest version

Version 1.0

  • Released