Advanced Custom Fields: Font Awesome Field WordPress 插件

Advanced Custom Fields: Font Awesome Field WordPress 插件

描述

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

  • Specify which FontAwesome icon sets to use (Solid, Regular, Light, Thin, Duotone, 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.

兼容性

This ACF field type is compatible with:
* ACF 5.7+
* FontAwesome 4.x and 5.x and 6.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.

相关推荐

发表回复

房先生
我们将24小时内回复。
2024-09-18 15:04:06
您好,有任何疑问请与我们联系!
您的工单我们已经收到,我们将会尽快跟您联系!
[QQ客服]
2781198
加我微信
[电话联系]
13585372227
[电子邮件]
chaoneo@163.com
取消

选择聊天工具: