
內容簡介
這個外掛顯示在「設定」->「字體」。
針對每個 @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 陣列,並將每個字體家族新增到您的「字體」下拉式選單中 */
外掛標籤
開發者團隊
原文外掛簡介
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 */
