
內容簡介
Rundiz Font Awesome 外掛允許使用者從自己的主機或伺服器使用 Font Awesome 圖示,並可更新至 GitHub 上的最新版本。此外掛支援多個版本,並可避免與其他外掛或佈景主題的衝突。
【主要功能】
• 使用自有主機的 Font Awesome 圖示
• 支援版本 4、5、6、7
• 可手動排除重複的 Font Awesome
• 提供自訂樣式的載入代碼
• 無需使用 CDN
外掛標籤
開發者團隊
原文外掛簡介
Use Font Awesome icons from your own host/server. Update the latest releases from GitHub.
Choose the major version and install the latest minor version. For example: Choose major version 6, and install the latest of 6.x.xx.
Currently supported for version 4, 5, 6, 7.
This plugin did not use CDN (content delivery network). If you want to use CDN, please use official Font Awesome plugin instead.
You can dequeue duplicated Font Awesome handles from other plugins or themes to prevent conflict.
You can disable enqueue from this plugin in case you would like to do it manually.
To get asset files for manually enqueue, use this code.
if (function_exists('rdfontawesome_get_enqueue_files')) {
$result = rdfontawesome_get_enqueue_files();
if (isset($result['css']) && is_array($result['css'])) {
$faVersion = ($result['faVersion'] ?? false);
$i = 1;
foreach ($result['css'] as $css) {
wp_enqueue_style('myplugin_fontawesome_' . $i, $css, [], $faVersion);
++$i;
}
unset($css, $faVersion, $i);
}
}
To get URL base of the Font Awesome assets for use another files, use this code.
if (function_exists('rdfontawesome_get_public_url_base')) {
echo rdfontawesome_get_public_url_base();
}
Tested up to PHP 8.5.
Font Awesome files are belong to https://fontawesome.com
