前言介紹
- 這款 WordPress 外掛「Simple Gutenberg Google Fonts」是 2018-10-04 上架。
- 目前有 30 個安裝啟用數。
- 上一次更新是 2018-10-13,距離現在已有 2395 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.9.8 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.4 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
acosmin |
外掛標籤
font | fonts | gutenberg | google fonts | Gutenberg Fonts |
內容簡介
Simple Google Fonts可以在WordPress的新版本v5.0編輯器(代號Gutenberg)內部更改默認字體為Google字體。您需要安裝和啟用Gutenberg才能使用此外掛
它會做什麼?
Simple Google Fonts可以在WordPress的新版本v5.0編輯器(代號Gutenberg)內部更改默認字體為Google字體。您需要安裝和啟用Gutenberg才能使用此外掛
需要知道的事情:
閱讀“啟用後”部分以獲取使用信息。
支持的文章類型:文章和頁面
您可以為個別文章和頁面或全局位置設置Google字體
全局位置意味著從選定文章的樣式將應用於整個網站。它還會在編輯器中應用樣式,對於新的或舊的文章(它們沒有應用任何樣式)。
發布文章後,您需要啟用它的全局模式才能全局使用。
如果您沒有網路連接,Google字體將不會顯示(除非您已經在系統中安裝了它們)。
待完成事項:
為body和headings都添加word-spacing支援
如果字體支援這些變體,請自動添加700和700i權重
GDPR注意事項
使用此插件(請求來自Google字體服務器的數據)即表示您同意Google檢索您的IP地址並且可能向第三方發送它,同時,根據您的隱私政策和條款和條件,負責通知並獲取您網站用戶的同意。
請閱讀Google的隱私政策,如果您同意,可以開始使用此外掛。
主題開發人員
您可以使用sgf_defaults過濾器更改插件的默認值,例如:
add_filter('sgf_defaults',function($defaults){
// since v1.0.1
$check = function_exists('sgf_get_font_id');
// Headings font family
$hff =!$check?0:sgf_get_font_id('Josefin Sans');
// Body font family
$bff =!$check?0:sgf_get_font_id('Muli');
// Headings
$defaults ['headings'] ['ff'] = $hff; // int |字體家族
// Bodybr / >
$defaults ['body'] ['ff'] = $bff; // int |字體家族
$defaults ['body'] ['wt'] ='400'; //字符串|字體重量
$defaults ['body'] ['lh'] = 1.8; // 浮點數 | 行高
$defaults ['body'] ['ls'] = 0; //浮點數|字符間距
$defaults ['body'] ['ws'] = 0; //浮點數|單詞間距
//返回新的默認值
return $defaults;
},15);
對於標題,您可以使用sgf_headings_defaults,例如:
add_filter('sgf_headings_defaults',function($defaults,$headings){
// $ headings = [ 'h1', ...'h6' ]。
$defaults ['h1'] ['wt'] ='400'; // 字符串| H1字體重量,斜體自動添加。
$defaults ['h1'] ['tt'] ='none'; //字符串| H1文本轉換
$defaults ['h1'] ['lh'] = 1.8; // 浮點數 | 行高度
$defaults ['h1'] ['ls'] = 0; // 浮點數|字符間距
$defaults ['h1'] ['ws'] = 0; // 浮點數|詞間距
//返回新的默認值
return $defaults;
},15);
原文外掛簡介
Simple Google Fonts adds the posibility to change default fonts to Google fonts from within the new WordPress v5.0 editor, codename Gutenberg. You’ll need Gutenberg installed and activated in order to use this plugin.
What it does?
Simple Google Fonts adds the posibility to change default fonts to Google fonts from within the new WordPress v5.0 editor, codename Gutenberg. You’ll need Gutenberg installed and activated in order to use this plugin.
Things to know:
Read the After activation section for some info on how to use it.
Supported post types: posts and pages
You can set Google fonts for individual posts and pages or globally.
Globally means that the styles from a selected post will apply to the entire website. It will also apply the styles in the Editor, for new or old posts (that don’t have any styles applied to them).
The post needs to be published for you to be able to use its styles globally. If for some reason you change that post to draft mode and the global mode is enabled on it, the option will reset and you’ll need to enable it again after you publish the post.
It’s safe to say that if you don’t have an Internet connection, Google fonts will not display (unless you have them installed on your system).
To do list:
Add support for word-spacing for both body and headings
Auto add 700 and 700i weights if the font supports those variants.
GDPR Notice
By using this plugin (which requests data from Google Fonts servers) you consent that Google will retrieve your IP address and that it might send it to third parties. Also, it’s your responsability to notify and obtain consent from your website’s users (by updating your Privacy Policy and Terms and Conditions).
Please read Google’s Privacy Policy and if you agree with it, you can start using this plugin.
Theme developers
You can use the sgf_defaults filter to change the plugin defaults, example:
add_filter( 'sgf_defaults', function( $defaults ) {
// since v1.0.1
$check = function_exists( 'sgf_get_font_id' );
// Headings font family
$hff = ! $check ? 0 : sgf_get_font_id( 'Josefin Sans' );
// Body font family
$bff = ! $check ? 0 : sgf_get_font_id( 'Muli' );
// Headings
$defaults[ 'headings' ][ 'ff' ] = $hff; // int | Font Family
// Body
$defaults[ 'body' ][ 'ff' ] = $bff; // int | Font Family
$defaults[ 'body' ][ 'wt' ] = '400'; // string | Font Weight
$defaults[ 'body' ][ 'lh' ] = 1.8; // float | Line Height
$defaults[ 'body' ][ 'ls' ] = 0; // float | Letter spacing
$defaults[ 'body' ][ 'ws' ] = 0; // float | Word spacing
// Returns new defaults
return $defaults;
}, 15 );
For headings you can use the sgf_headings_defaults, example:
add_filter( 'sgf_headings_defaults', function( $defaults, $headings ) {
// $headings = [ 'h1', ... 'h6' ];
$defaults[ 'h1' ][ 'wt' ] = '400'; // string | H1 font weight, italic is added automatically.
$defaults[ 'h1' ][ 'tt' ] = 'none'; // string | H1 text transform
$defaults[ 'h1' ][ 'lh' ] = 1.8; // float | Line height
$defaults[ 'h1' ][ 'ls' ] = 0; // float | Letter spacing
$defaults[ 'h1' ][ 'ws' ] = 0; // float | Words spacing
// if a propriety is left out, it will use the plugin default.
// you can use this for headings from h1 to h6
return $defaults;
}, 10, 2 );
For text logos you can use the sgf_styles_frontend_txt_logo filter to make sure it always takes on the Headings font family, example:
add_filter( 'sgf_styles_frontend_txt_logo', function() { return '.logo-wrap'; }, 15 );
You can add these in your functions.php file. If you want to support old PHP versions, replace the anonymous functions with normal functions.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Simple Gutenberg Google Fonts」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | trunk |
延伸相關外掛(你可能也想知道)
Classic Editor 》Classic Editor 是由 WordPress 團隊維護的官方外掛程式,可還原之前(也就是「經典」)的 WordPress 編輯器和「編輯文章」畫面,使使用者可以使用延伸這個畫...。
Advanced Editor Tools 》高級編輯工具(以前稱為 TinyMCE Advanced)引入了一個「經典段落」區塊,供區塊編輯器(Gutenberg)使用。, 如果您還沒有準備好切換到區塊編輯器,或者有插...。
Classic Widgets 》Classic Widgets 是由 WordPress 團隊維護的官方外掛,能夠恢復先前(即「經典」)的 WordPress widgets 設定畫面。該外掛將於 2024 年或必要時保持支援和維...。
Starter Templates – AI-Powered Templates for Elementor & Gutenberg 》免費模板,支援 Elementor、Beaver Builder 和 Block Editor, 使用 Starter Templates 外掛,只需數分鐘即可建立專業且完美的網站。此外掛為使用者提供超過 2...。
Spectra Gutenberg Blocks – Website Builder for the Block Editor 》a.com/tutorials/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme" rel="nofollow ugc">Spectra tutorials, you can easily learn how to ...。
Disable Gutenberg 》此外掛可禁用新的 Gutenberg 編輯器 (也稱為區塊編輯器),並以經典編輯器取代它。你可以完全禁用 Gutenberg,或從文章、頁面、角色、文章類型和主題模板中有...。
Gutenberg Blocks with AI by Kadence WP – Page Builder Features 》Kadence Blocks 是一個 WordPress 外掛,它附加自訂區塊和選項,擴展了 Gutenberg 編輯功能,使您能夠輕鬆創建美麗的網站,而不需要任何程式編寫。Kadence Bl...。
Extendify 》Extendify 是一個網站設計和製作工具平台,提供豐富的圖案和全頁面佈局,可用於 Gutenberg 區塊編輯器,幫助人們建立美麗的 WordPress 網站。, 使用 Extendif...。
Page Builder Gutenberg Blocks – CoBlocks 》, 注意:對於已受 CoBlocks 3.0.0 版本影響的使用者,請查看我們在 WordPress.org 支援論壇文章,如果您需要支援,請建立新的主題帖。, , CoBlocks 是新版 Gu...。
Otter Blocks – Gutenberg Blocks, Page Builder for Gutenberg Editor & FSE 》Otter 是一款 Gutenberg Blocks 頁面建構外掛,可為 WordPress Block Editor(又稱 Gutenberg)添加額外功能,讓您享受更好的頁面建構體驗,而無需使用傳統的...。
AI Powered Starter Templates by Kadence WP 》用三個滑鼠點擊建立一個美觀的「效能優化」網站, 在幾分鐘內創建和自定義專業設計的網站。, Kadence Starter Templates 為您提供使用 WordPress 區塊構建器的...。
GenerateBlocks 》將不同的功能整合至編輯器,但並不會因為過多的一維方塊造成內容過於臃腫。使用 GenerateBlocks,您只需深入學習少量的方塊,即可用於創建任何內容。, Genera...。
VK Blocks 》這是一個擴充 Gutenberg 模塊的外掛。, [ 模塊 ], , 成員, 外框, 警示, 常問問題, 氣球, 流, 按鈕, 公關模塊, 公關內容, 邊框盒, 標題(帶副標題), 響應間距...。
Stackable – Page Builder Gutenberg Blocks 》終極與古鐸版衣搭檔, Stackable 是您一直在等待的終極可靠古鐸版衣搭檔。使用堅強、輕便的自訂區塊、現成設計、UI套件、全域設定和高級自訂選項建立動態網站...。
Kubio AI Page Builder 》, , Kubio 是一個創新的基於區塊的 WordPress 網站建立工具,它以全新的區塊來擴充編輯器功能並提供使用者無限的樣式選項。透過先進的編輯功能,Kubio 使用者...。