[WordPress] 外掛分享: Advanced Custom Fields: Font Awesome Field

首頁外掛目錄 › Advanced Custom Fields: Font Awesome Field
WordPress 外掛 Advanced Custom Fields: Font Awesome Field 的封面圖片
100,000+
安裝啟用
★★★★
4.9/5 分(36 則評價)
67 天前
最後更新
0%
問題解決
WordPress 3.5+ PHP 5.6+ v5.0.2 上架:2014-02-17

內容簡介

在 Advanced Custom Fields 中添加一個< a href="http://fontawesome.io/" rel="nofollow ugc">Font Awesome 圖標字段類型。

指定要使用哪些 Font Awesome 圖標集(Solid、Regular、Light、Thin、Duotone、Brands 和自定義上傳圖標)(一些功能僅在使用 FontAwesome 5.x 或 6.x 圖標時可用)
創建自己的 FontAwesome 圖標篩選列表,與不同的字段使用不同的自定義圖標集合
返回圖標元素、圖標類名、圖標 Unicode 或包括元素、類、Unicode 值和 SVG 數據的對象(如果適用)
可選地在需要時將 Font Awesome 加載到頁腳中(當頁面上使用 FontAwesome 字段時)
與 FontAwesome GraphQL 集成,用於加載您的 FontAwesome Kits ,搜索圖標以及加載最新版本的 FontAwesome

注意:建議讓此外掛在前端加載最新版本的 Font Awesome;或者使用您的FontAwesome Kit自行包含最新版本。這樣管理區域中可用的圖標在您的網站前端上才能正確顯示。

相容性

此 ACF 字段類型相容於:
* ACF 5.7+
* FontAwesome 4.x 和 5.x 和 6.x 圖標

可選配置
過濾器

ACFFA_always_enqueue_fa:返回 true,即使在頁面中沒有使用 ACF FontAwesome 字段,也始終在前端加載 FontAwesome。這將在標題中加載 FontAwesome 而不是在頁腳中。
ACFFA_admin_enqueue_fa:返回 false,停止在管理區域中加載 FontAwesome。如果您已經以其他方式加載 FontAwesome,這很有用。
ACFFA_get_icons:(僅適用於 FontAwesome 4.x 和 5.x 圖標)過濾從數據庫加載的圖標和圖標詳細信息的陣列
ACFFA_get_fa_url:過濾用於在站點前端和管理區域中加載 FontAwesome 的 URL。
ACFFA_override_major_version:過濾以手動設置要加載的 FontAwesome 的「major」版本(接受 4、5 或 6)。注意:必須在調用 ACF get_field() 函數之前註冊此過濾器。

外掛標籤

開發者團隊

⬇ 下載最新版 (v5.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Advanced Custom Fields: Font Awesome Field」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Add a Font Awesome icon field type to Advanced Custom Fields.

Specify which FontAwesome icon sets to use (Solid, Regular, Light, Thin, Duotone, Duotone Sharp, Brands, and Custom Upload Icons) (Some features only available with FontAwesome 5.x or 6.x icons)
Create your own custom filtered list of FontAwesome icons to use with your fields. Use different custom icon sets with different fields
Returns Icon Element, Icon Class, Icon Unicode, or an Object including the element, class, unicode value, and SVG data (if applicable)
Optionally enqueues Font Awesome in footer where needed (when a FontAwesome field is being used on the page))
Integrates with the FontAwesome GraphQL for loading your FontAwesome Kits, searching for icons, and loading the latest version of FontAwesome

Note: It is recommended to let this plugin enqueue the latest version of Font Awesome on your front-end; or include the latest version yourself using your FontAwesome Kit; so that available icons in the admin area will be displayed properly on your sites front-end.
Compatibility
This ACF field type is compatible with:
* ACF 5.7+
* FontAwesome 4.x, 5.x, 6.x and 7.x fonts
Optional Configuration
Filters

ACFFA_always_enqueue_fa: Return true to always enqueue FontAwesome on the frontend, even if no ACF FontAwesome fields are in use on the page. This will enqueue FontAwesome in the header instead of the footer.
ACFFA_admin_enqueue_fa: Return false to stop enqueueing FontAwesome in the admin area. Useful if you already have FontAwesome enqueued by some other means.
ACFFA_get_icons: (Applies to FontAwesome 4.x and 5.x icons only) Filter the array of icons and icon details loaded from the database
ACFFA_get_fa_url: Filter the URL used for enqueuing FontAwesome in the frontend and admin areas of the site.
ACFFA_override_major_version: Filter to manually set the ‘major’ version of FontAwesome to load (accepts either 4, 5, or 6). NOTE: This filter must be registered before any calls to ACF get_field() function are made.
ACFFA_fa_api_key: Filter to programmatically set the FontAwesome API key.
ACFFA_fa_kit_token: Filter to programmatically set the FontAwesome kit token.

延伸相關外掛

文章
Filter
Mastodon