Options for Block Themes

外掛說明

範本編輯器

與 WordPress 5.9 同時推出的預設佈景主題,是 Twenty Twenty-Two 區塊佈景主題。

這個外掛新增了佈景主題原本沒有的範本管理 (匯出/匯入) 功能,因此不再需要子佈景主題。

區塊佈景主題會移除指向外觀自訂器的連結。這個外掛可以改變這一切!

這個外掛還能在任何區塊佈景主題中啟用範本編輯器。

附加的核心區塊選項

  • 啟用 [導覽列] 區塊對話方塊的可開闔子選單選項。
  • 啟用 [群組] 及 [封面] 區塊的新增完整區塊連結選項。
  • 啟用開啟其中一個 [詳細資料] 區塊便關閉其他 [詳細資料] 區塊的選項,讓 [詳細資料] 區塊具備基本的開闔功能。

恢復外觀自訂器的 [自訂] 連結

啟用這個外掛後,管理後台的 [外觀] 選單中會重新出現 WordPress 6.0 之前版本的 [自訂] 選單項目及工具列位置。如有需要,可以停用這個重新出現的選單項目。

編輯現有的範本

安裝並啟用這個外掛後,請前往 [控制台] 的 [外觀]→[管理範本],便能變更目前使用的佈景主題或其他佈景主題自訂範本的標題、內容說明及名稱。

再製範本

將範本儲存為複本至目前使用的佈景主題。

這能讓使用者使用 WordPress 範本繼承去命名範本,讓這些範本可以用於自訂內容類型、自訂分類法、指定文章/頁面或任何需要的項目。

刪除範本

可以從目前使用的佈景主題及其他佈景主題刪除範本。這項操作不會刪除佈景主題的原始範本,僅會刪除客製化的部分。

下載範本

將範本下載為 JSON 檔案做為備份,或將他們移轉至其他 WordPress 網站。

上傳範本

將範本的 JSON 檔案上傳至目前使用的佈景主題。這能讓使用者使用備份檔案還原範本,或是將範本移轉至其他 WordPress 網站。

下載全域樣式

將全域樣式下載為 JSON 檔案做為備份,或將他們移轉至其他 WordPress 網站。

上傳全域樣式

將全域樣式的 JSON 檔案上傳至目前使用的佈景主題。這能讓使用者使用備份檔案還原全域樣式,或是將全域樣式移轉至其他 WordPress 網站。

固定式頁首

在區塊佈景主題中啟用與 Twenty Twenty-Two 相同的固定式頁首/選單的功能。

動畫式網站標誌

啟用捲動頁面時壓縮頁首網站標誌的功能。

將 Google Fonts 網頁字型加入至編輯器

注意事項:由於 WordPress 6.5 導入 [字型庫] 功能,因此外掛的這項功能僅與合併使用 WordPress 5.8 至 6.4 及傳統佈景主題有關。

選取 Google Fonts 網頁字型,並將他們新增至網站編輯器的 [全域樣式] 選項中。

移除區塊佈景主題字型

注意事項:由於 WordPress 6.5 導入 [字型庫] 功能,因此外掛的這項功能僅與使用 WordPress 5.8 至 6.4 有關。

這個外掛可以讓網站管理員選取網站編輯器要加入的佈景主題字型。如果不需要某些字型,可以在網站前端封鎖這些字型的載入。

安裝方式

安裝並啟用這個外掛後,便能在網站上啟用範本編輯器。

1) 自動安裝 Options for Block Themes 或上傳 ZIP 檔案手動安裝。
2) 在 WordPress 管理後台的 [外掛] 選單中啟用外掛。
3) 在目前使用的佈景主題中使用範本編輯器。

使用者評論

2024 年 12 月 15 日 1 則留言
Options for Block Themes by Oliver Campion of Web:D has built in an option to: enable expandable submenus to the Navigation Block modal – which is tech speak for collapsible submenus on mobile devices. This plugin works and solves our top burning issue with WP 6.7 (and prior to that WP 6.6). Thank you Oliver Campion of Web:D. Our thanks to Hans-Gerd Gerhards who highlighted the new functionality of the Options for Block Themes plugin in a German language post on his website: Aufklappbare Untermenüs bei Block Themes (Expandable submenus in block themes).
2024 年 4 月 10 日 1 則留言
The great plugin “Options for Block Themes” offers some interesting things that are very interesting for users who create their websites with a block theme such as Twenty Twenty-Four. For me, an important aspect was the shrinked header. But the other options are also very helpful because they simplify the management of block themes.
2022 年 2 月 23 日 1 則留言
Not for rookies as it takes a little bit of fiddling but this fiddling is necessary and not a lot. If you have any experience at all and want to create new or modified template copied this plugin is the bomb.
2022 年 2 月 19 日 1 則留言
This plugin has been a huge help to me because we run multiple websites, and even with the Site Editor making all of the sites identical would be tiresome. In our case, it was simply a matter of installing Template Manager on both sites, then one click to select a template on the donor site, and a second click to download it. Then (in the recipient site) after a click or two to delete modifications to the old templates, a final click to upload the new one. All that then remains is to edit a page and select the new template in the setting dropdown. It saves hours and hours of work!
閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Options for Block Themes〉的開發相關工作。

參與者

〈Options for Block Themes〉外掛目前已有 2 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Options for Block Themes〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.3.7

  • Fixed some minor bugs and added “scrollIntoView()” when opening Details block

1.3.6

  • Added option to close other Details Blocks when selected one is opened

1.3.5

  • Added full block link option for Group and Cover Blocks

1.3.4

  • Added an option for expandable submenus to the Navigation Block modal

1.3.3

  • Fixed a minor JavaScript bug

1.3.2

  • Updated “Shrink header logo” option to add “shrink-logo” class to the header on scroll even if a Site Logo block isn’t present

1.3.0

  • Added support for persistent object cache when uploading global styles to the active theme

1.2.9

  • Fixed a bug when saving settings

1.2.8

  • Re-enabled Google Font functionality for classic themes, fixed bug with mulitple logos shrinking

1.2.7

  • Bug fixed when using a child them with “Remove Theme Fonts” option

1.2.6

  • Preparing for the release of WordPress v6.5

1.2.5

  • Added the ability to download, delete and upload global styles

1.2.4

  • Updated the JavaScript for sticky headers when the admin bar is showing

1.2.3

  • If Google font download fails then notice is shown and plugin falls back non-local fonts

1.2.2

  • Fixed bug with Theme Font Removal
  • Fixed bug with Google Font Weight Order
  • Fixed bug with hosted Google Fonts not loading in the editor
  • Added weights to Google Font dropdowns

1.2.1

  • Fixed a bug with sticky header when the admin bar is showing
  • Added option to choose Google “font-display” property
  • Added a fix for the Shortcode Block bug introduced in WordPress v6.2.2

1.2.0

  • Fixed a bug when removing theme fonts, added an option to hide links to the Customizer

1.1.9

  • Bugs fixed and work undertaken to prepare for Fonts API

1.1.8

  • Various bugs and translation issues fixed

1.1.7

  • Paved the way for more on-scroll header animations
  • Added an option for shrunken logo width

1.1.6

  • General housekeeping

1.1.5

  • Fixed a bug that prevented multiple font styles for the same Google font

1.1.2

  • Added a theme option to attempt to host Google Fonts locally

1.1.1

  • Added a theme option to animate (shrink) the header Site Logo block on scroll

1.1.0

  • Added ability to disable and prevent FSE fonts from being loaded
  • Bug fix

1.0.9

  • Added ability to upload, download or delete template parts
  • Added Google Fonts to editor

1.0.8

  • Bug fix

1.0.7

  • Tweaked sticky header CSS
  • Bug fix

1.0.6

  • Added option to set the header as a sticky header

1.0.5

  • Show the “Customize” admin menu item in “Dashboard – Appearance” and in the Admin Bar

1.0.4

  • Added the ability to select, download templates from inactive themes and to delete templates

1.0.3

  • Bug fixes

1.0.2

  • Added the ability to download and upload templates

1.0.1

  • Added the ability to edit or duplicate customized templates

1.0.0

  • First version of the plugin