[WordPress] 外掛分享: Elegant Custom Fonts

首頁外掛目錄 › Elegant Custom Fonts
WordPress 外掛 Elegant Custom Fonts 的封面圖片
3,000+
安裝啟用
★★★★★
5/5 分(3 則評價)
948 天前
最後更新
問題解決
WordPress 4.1+ v1.0.1 上架:2018-02-16

內容簡介

這個外掛顯示在「設定」->「字體」。

針對每個 @font-face,您可以指定 .woff 的 URL、權重、樣式以及字體家族名稱。

適當的 @font-face 規則會儲存在 CSS 檔案中並使用 wp_enqueue_stylesheet 加入佇列,讓您可以使用 font-family CSS 屬性來使用這個字體。

沒有複雜的手續。沒有 API 金鑰。沒有字體轉換。沒有膨脹。

外掛及佈景主題開發者整合指南

使用 ECF_Plugin::get_font_families() 取得由 Elegant Custom Fonts 新增的字體家族清單。然後,將它們添加到您的外掛或佈景主題中的任何「字體」下拉式選單中。

範例:

if (class_exists('ECF_Plugin')) {
$font_family_list = ECF_Plugin::get_font_families();
} else {
$font_family_list = null;
}

/* 迴圈經過 $font_family_list 陣列,並將每個字體家族新增到您的「字體」下拉式選單中 */

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Elegant Custom Fonts」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin appears at Settings -> Fonts.
For each @font-face, specify .woff URL, weight, style, and a font family name.
Appropriate @font-face rules will be saved to a CSS file and enqueued with wp_enqueue_stylesheet, so that you can use the font with the font-family CSS property.
No nonsense. No API keys. No font conversion. No bloat.
Integration Instructions for Plugin & Theme Developers
Use ECF_Plugin::get_font_families() to get a list of font families added with Elegant Custom Fonts. Then add these to any “Font” dropdowns in your plugin or theme.
Example:
if (class_exists(‘ECF_Plugin’)) {
$font_family_list = ECF_Plugin::get_font_families();
} else {
$font_family_list = null;
}
/* loop through the $font_family_list array and add each family to your ‘Font’ dropdowns */

延伸相關外掛

文章
Filter
Apply Filters
Mastodon