Create Block Theme

外掛說明

這個外掛能讓使用者完成以下目的:
– 建立全新佈景主題、空白佈景主題、子佈景主題或樣式變化
– 列出及預覽字型系列,並將字型內嵌至佈景主題中
– 在佈景主題中內嵌 Google Fonts 網頁字型
– 在佈景主題中內嵌網站主機字型資源

這個外掛僅供開發使用,它不適用於正式環境網站,而是用於建立新的區塊佈景主題的工具。

步驟 1:設定

安裝並啟用 Create Block Theme 外掛。

登入 WordPress 管理後台後,在 [外觀] 中會出現 2 個新頁面:
– 建立區塊佈景主題
– 管理佈景主題字型

步驟 2:自訂樣式

使用網站編輯器變更網站樣式及範本。網站管理員可以使用外掛功能將新字型加入區塊佈景主題。

步驟 3:匯出

在 WordPress 控制台中,前往 [外觀]→[建立區塊佈景主題] 區段,選取其中一項可用功能,並依需求為佈景主題加入詳細資料,style.css 會使用這些詳細資料。點擊 [產生] 按鈕,便能儲存佈景主題。

螢幕擷圖

使用者評論

2023 年 3 月 23 日 1 則留言
This is amazing work. Fonts, custom patterns, it all gets carried over. For me something important is missing: If I tinker with the theme a bit and export it, there is no way to change the version number. Every time I import a new version of the exported theme it gets imported as a new theme. I tried editing the version number in the zip file but that doesn't change it.
2023 年 3 月 5 日 1 則留言
Doesn't automatically push the footer to the bottom of the page whether there is content or not.
2023 年 2 月 25 日 1 則留言
Create Child theme does not bring over Header and Footer Template Parts. error msg. is "Template part has been deleted or is unavailable: header" and "Template part has been deleted or is unavailable: footer". Using Twenty Twenty-Three Theme v. 1.0, Gutenberg v. 15.2.1, and Create Block theme v. 1.6.0. Create Block Theme extremely useful. I love the Additional CSS in Global but it disappears with the latest Gutenberg update.
2023 年 2 月 22 日 1 則留言
I hope to find out that I am doing something wrong or that the environment I'm working with is the problem but so far I've had a lot of problems with the plugin. This plugin was recommended to me as a good way to get started in theme development. I had been hoping to move away from Divi as my website builder of choice. I've tried cloning the Twenty Twenty-Three theme but the clones have been broken in a couple of ways. I've had template elements (header and footer) be missing and "layout" options missing from blocks that were there on the original theme. I tried creating a blank boilerplate theme instead. I've run this multiple times on the same 'raw' WordPress install (created in LOCAL) and this has resulted in three different outcomes: a critical error, an incomplete theme that is just a folder that is empty except for a read me file, and also a successful blank theme.
2023 年 1 月 25 日 1 則留言
At this stage this plugin is a total bug fest. It would be great if it worked. Almost nothing works as shown. Can't import it's own child themes. Can't write to local fonts. And when you manually FTP your new font into the right folder and edit the theme.json file it works. For a day. Then for whatever reason the next day - only one font variation will work. Double checked everything. Re uploaded new theme.json. Because I need PT Sans Narrow to work with the regular and bold (for squeezing headings in) this is a pain. The only fix I could come up with was to edit theme.json with the Bold PT Sans renamed as my-swear-word-font. That worked. Still can't export a child theme after the update. And to think the TOP MAN at WordPress flouted this.
閱讀全部 18 則使用者評論

參與者及開發者

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

參與者

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

將〈Create Block Theme〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

1.7.1

  • Update screenshots
  • Fix manage fonts UI and backend when no settings are defined in theme.json
  • Variable font weight range

1.7.0

  • Manage fonts minor refactor. Move elements from PHP to react
  • Allow otf font file upload
  • Local fonts section implementation in React
  • Fonts outline sidebar
  • Update Google Fonts JSON data from API

1.6.3

  • (Fix refactor regression) Remove white spaces from theme slug

1.6.2

  • Refactor font-management class
  • Refactor create-block-theme class
  • fix manage theme font menu casing
  • Add phpcs exception to avoid PHP8.0 incompatibility errors
  • Fix blank theme screenshot fatal error
  • Fix lint issues using auto fixer tool
  • Update Google Fonts JSON data from API
  • Fix CSS lint issues
  • Fix PHP lint issues
  • Fix JS lint issues
  • Add lint validation to PR workflows
  • fix package lock sync issue

1.6.1

  • Add: input for theme tags
  • Placeholder URL change to TT3
  • Remove white spaces from theme slugs

1.6.0

  • Update main readme and add supporting docs
  • Fix Depreciation Warning
  • Cleanup Manage Theme Fonts UI
  • Bundle template images into theme assets and make their urls relative
  • Cloned themes: Add original theme name to readme.txt and style.css
  • Font families collapsed by default
  • Fix: Unexpected action when clicking Collapse chevron
  • Lint all CSS files
  • Fix: composer scripts doesn’t work on Windows
  • Use Gutenberg Theme JSON resolver if its available
  • Update Google Fonts JSON data from API
  • Replacing mkdir() calls with WordPress wp_mkdir_p() function

1.5.1

  • check for DISALLOW_FILE_EDIT and simplify permission check logic
  • Load google fonts data from url
  • Separate styles and templates reset
  • Add spinner while google fonts load instead of showing a blank page
  • Add: code linting scripts
  • Update Google Fonts JSON data from API
  • Avoid pre commit verifications on Github actions to prevent action errors caused by linting problems

1.5.0

  • Fix: browser console errors
  • Fix: Adding or removing fonts fails in some Windows environments
  • Add placeholder screenshot to boilerplate theme
  • Refactor: Add Google Fonts section from vanilla JS to React app
  • Adding demo text settings

1.4.0

  • Specify node and npm versions, add nvmrc file
  • Add theme screenshot uploading
  • Manage fonts: Demo text editable
  • Update Google Fonts JSON data from API

1.3.10

  • Remove font face: avoid unwanted removal of fontfamily.
  • Add missing spaces to option labels

1.3.9

  • Updating Tested up to: 6.1
  • I18N: Some new UI strings are not translatable
  • Replace “current theme” with “active theme” (or “currently active theme”)
  • Improve translation process by removing trailing spaces
  • Fonts: remove font files from theme assets folder if the font face/family is removed.
  • Refactor to read raw theme.json data instead of using core methods
  • Update Google Fonts JSON data from API

1.3.8

  • Fixes the spelling of definition
  • Fixing readme contributors
  • Add contributor username to readme
  • Update GitHub action to avoid deprecation warning
  • Update Google Fonts JSON data from API
  • Update Google Fonts JSON data from API
  • Check permission before running functions that need file write permissions
  • Allow previewing system font

1.3.7

  • Moving assets files to be auto updated by the release action

1.3.6

  • Auto update assets using a github action

1.3.5

  • Auto release: commit updated php file with the new version

1.3.4

  • auto update version of php file

1.3.3

  • Automatic release improvements

1.3.2

  • Automatic release improvements

1.3.1

  • Update .distignore

1.3.0

  • Updating google fonts data
  • Force https to load Google fonts preview
  • Add the ability to select/unselect all google font variants
  • Merge branch ‘trunk’ into try/manage-fonts
  • Update google fonts JSON data automatically using a repo action
  • Merge branch ‘trunk’ into release-action
  • Merge branch ‘trunk’ into try/manage-fonts
  • Merge branch ‘try/manage-fonts’ into release-action
  • Manage theme fonts
  • Automate release: build, version bump, changelog, deploy to wp.org
  • Automate release

1.2.3

  • Add translation domain (#121)
  • Check for nonce index (#120)
  • Validating mime type of font file on server side (#119)

1.2.2

  • Add capabilities and nonce checks (#118)

1.2.1

  • Correcting version number

1.2.0

  • Embed Google fonts and local font files in theme (#113)
  • Change button text (#112)
  • Add check and directory creation for template and parts folders. (#110)
  • Change theme.json schema of blank theme if Gutenberg isn’t installed. (#107)

1.1.3

  • update links, screenshots of the new changes (#97)
  • Add $schema and use Gutenberg classes (#99)
  • Update readme to include latest features (#100)
  • Generate $schema URL in the same way as core. (#105)

1.1.2

  • Save a theme variation (#90)
  • Make UI string ‘Create Block Theme’ can be translatable (#92)

1.0.1

  • Add option to create blank theme. (#70)
  • Improve form instructions (#76)
  • Form cleanup and Theme name check (#77)
  • Get the correct merged theme.json data (#88)

1.0

  • Initial version.