外掛說明
Convert to Blocks 是能將傳統編輯器內容即時轉換為區塊的 WordPress 外掛。安裝 Gutenberg 外掛或升級至 WordPress 5.0 或更新版本後,網站內容會顯示為 [傳統編輯器] 區塊。這些區塊能具備完整功能,也能在網站前端正確顯示內容,但是會使得內容作者無法充分發揮區塊編輯功能;為了充分發揮區塊編輯功能,傳統編輯器產出的內容必須轉換為區塊內容。這個外掛能完成即時轉換,當區塊編輯器編輯傳統編輯器產出的內容時,相關內容會剖析為區塊內容。只要在區塊編輯器中儲存內容,內容的新結構便會儲存至資料庫中。這個方式可以降低風險,因為僅需變更內容的資料庫值。
請注意,內部區塊轉換支援必須安裝 Gutenberg 10.9.0 或 WordPress 5.9 的更新版本。
螢幕擷圖
安裝方式
手動安裝
- 將外掛安裝套件解壓縮所得的
convert-to-blocks
資料夾上傳至網站的/wp-content/plugins/
目錄。 - 在 WordPress 管理後台的 [外掛] 選單中啟用 Convert to Blocks。
常見問題集
-
如何知道外掛是否已執行?
-
在內容中找到傳統編輯器,然後試著離開該頁面,便會顯示「系統可能不會儲存變更」的提示訊息,這是因為 Convert to Blocks 會即時將網站內容轉換為區塊,且這些變更會在更新內容後才儲存。
-
Convert to Blocks 是否能處理自訂區塊?
-
預設無法處理。
-
Convert to Blocks 是否能處理巢狀區塊?
-
如果 WordPress 核心程式版本低於 5.7.2 (含),這個外掛所需的巢狀/內部區塊支援,無法正確執行於這些版本所整合的 Gutenberg 功能。這項功能所需的 Gutenberg 外掛版本需要高於 10.9.0 (含),即 WordPress 5.9 或更新版本。
使用者評論
參與者及開發者
變更記錄
1.3.1 – 2024-08-20
- Changed: Bump WordPress “tested up to” version 6.6 (props @sudip-md, @jeffpaul, @Sidsector9, @ankitguptaindia via #174).
- Changed: Bump WordPress minimum from 6.3 to 6.4 (props @sudip-md, @jeffpaul, @Sidsector9, @ankitguptaindia via #174).
- Fixed: Issue with saving a post before the convert to blocks transform was completed (props @mdesplenter, @Sidsector9, @dsawardekar via #173).
- Security: Bump
braces
from 3.0.2 to 3.0.3 (props @dependabot, @Sidsector9 via #168). - Security: Bump
ws
from 7.5.9 to 7.5.10 (props @dependabot, @Sidsector9 via #169).
1.3.0 – 2024-05-14
- Added: Block Catalog integration, and pagination support (props @dsawardekar, @iamdharmesh via #164).
- Changed: Adjust
enable_block_editor
method only to alter posts that support the gutenbridge (props @stormrockwell, @Sidsector9, @jeffpaul, @dsawardekar via #136). - Changed: Bump WordPress “tested up to” version 6.5 (props @QAharshalkadu, @jeffpaul, @Sidsector9, @sudip-md, @dkotter via #146, #161).
- Changed: Replaced lee-dohm/no-response with actions/stale to help with closing no-response/stale issues (props @jeffpaul via #159).
- Changed: Bump Node version from 16 to 20 (props @aaronjorbin, @Sidsector9, @dkotter via #160).
- Changed: Bump
actions/upload-artifact
from v3 to v4 (props @iamdharmesh via #162). - Security: Bump
follow-redirects
from 1.15.2 to 1.15.4 (props @dependabot, @dkotter via #153). - Security: Bump
browserify-sign
from 4.0.4 to 4.2.2 (props @dependabot, @dkotter via #145). - Security: Bump
@babel/traverse
from 7.11.5 to 7.23.7 (props @dependabot, @dkotter via #155). - Security: Remove old dependencies in favor of using
@wordpress/scripts
in our build workflow (props @Sidsector9, @dkotter via #167).
1.2.2 – 2023-10-16
- Changed: Bump WordPress “tested up to” version to 6.3 (props @kmgalanakis, @faisal-alvi, @jeffpaul, @peterwilsoncc via #132, #134
- Security: Bump
@cypress/request
from 2.88.11 to 3.0.1 andcypress
from 10.11.0 to 13.3.0 (props @dependabot, @iamdharmesh, @ravinderk via #138). - Security: Bump
postcss
from 8.4.20 to 8.4.31 (props @dependabot, @dkotter via #139). - Security: Bump
fsevents
from 1.2.9 to 1.2.13 (props @dependabot, @ravinderk via #140).
1.2.1 – 2023-07-26
- Added: More robust minimum PHP version check (props @dkotter, @ravinderk via #129).
- Changed: Bump minimum required PHP version from 7.4 to 8.0 in our
composer.json
config (props @c0ntax, @Sidsector9 via #122). - Fixed: Parse error caused by a comma (props @Sidsector9, @iamdharmesh, @ravinderk, @felipeelia via #123).
- Security: Bump
minimist
from 1.2.0 to 1.2.7 andmkdirp
from 0.5.1 to 0.5.6 (props @dependabot via #117). - Security: Bump
ini
from 1.3.5 to 1.3.8 (props @dependabot via #119). - Security: Bump
browser-sync
from 2.27.10 to 2.29.3 and removesqs
(props @dependabot via #120). - Security: Bump
word-wrap
from 1.2.3 to 1.2.5 (props @dependabot via #127).
1.2.0 – 2023-06-27
Note that this release bumps the WordPress minimum version from 5.7 to 6.1 and the PHP minimum version from 7.4 to 8.0.
- Added: Settings UI for managing supported post types (props @akshitsethi, @dinhtungdu, @Sidsector9, @jayedul, @dsawardekar, @terrance-orletsky-d7, @ouun via #66, #104, #112, #114).
- Added: Filter hook
convert_to_blocks_update_posts_query_params
to modifyWP_Query
parameters to query posts that need to be migrated (props @kmgalanakis, @Sidsector9, @sanketio via #113). - Added: Cypress end-to-end tests (props @barneyjeffries, @jeffpaul, @iamdharmesh, @Sidsector9, @vikrampm1 via #106).
- Changed: Bump PHP minimum supported version from 7.4 to 8.0 (props @barneyjeffries, @jeffpaul, @iamdharmesh, @Sidsector9, @vikrampm1 via #106).
- Changed: Bump WordPress minimum supported version from 5.7 to 6.1 (props @barneyjeffries, @jeffpaul, @iamdharmesh, @Sidsector9, @vikrampm1 via #106).
- Changed: Bump WordPress “tested up to” version 6.2 (props @Sidsector9 via #115).
- Changed: Updated the Dependency Review GitHub Action (props @jeffpaul via #109).
- Changed: WordPress.org Deploy action updated to use Node 16 (props @dkotter via #116).
1.1.1 – 2023-01-05
Note that this version bumps the minimum PHP version from 7.0 to 7.4 and the minimum WordPress version from 5.4 to 5.7.
- Added: Bulk migration demo to readme (props @jeffpaul, @dsawardekar via #79).
- Added: Release build GitHub Action to build a release zip used for testing (props @dkotter via #98).
- Changed: Bump WordPress minimum version from 5.4 to 5.7 and PHP minimum version from 7.0 to 7.4 (props @zamanq, @jeffpaul, @faisal-alvi, @mehul0810 via #80).
- Changed: Bump WordPress “tested up to” version to 6.1 props @peterwilsoncc, @faisal-alvi, @cadic via #88, #91).
- Removed:
is-svg
as it is no longer used after updating ancestor dependencypostcss-svgo
(props @dependabot via #85). - Fixed: WP-CLI helptext that is causing an unknown parameter error (props @dsawardekar, @jeffpaul, @norcross via #78).
- Security: Bump
socket.io-parser
from 3.2.0 to 4.2.1 andbrowser-sync
from 2.26.7 to 2.27.10 (props @dependabot via #81). - Security: Bump
minimatch
from 3.0.4 to 3.1.2 (props @dependabot via #82). - Security: Bump
nth-check
from 1.0.2 to 2.1.1 andcssnano
from 4.1.10 to 5.1.14 (props @dependabot via #84). - Security: Bump
postcss-svgo
from 4.0.2 to 4.0.3 (props @dependabot via #85). - Security: Bump
minimist
from 1.2.0 to 1.2.7 andmkdirp
from 0.5.1 to 0.5.6 (props @dependabot via #86). - Security: Bump
loader-utils
from 1.2.3 to 1.4.2 andwebpack-cli
from 3.3.10 to 3.3.12 (props @dependabot via #89). - Security: Bump
glob-parent
from 5.1.0 to 5.1.2 andwatchpack
from 1.6.0 to 1.7.5 (props @dependabot via #90). - Security: Bump
kind-of
from 6.0.2 to 6.0.3 (props @dependabot via #93). - Security: Bump
serialize-javascript
from 2.1.2 to 4.0.0 andterser-webpack-plugin
from 1.4.3 to 1.4.5 (props @dependabot via #94). - Security: Bump
engine.io
from 6.2.0 to 6.2.1 (props @dependabot via #95). - Security: Bump
decode-uri-component
from 0.2.0 to 0.2.2 (props @dependabot via #97).