[WordPress] 外掛分享: Pattern Editor

首頁外掛目錄 › Pattern Editor
WordPress 外掛 Pattern Editor 的封面圖片
70+
安裝啟用
★★★★★
5/5 分(1 則評價)
720 天前
最後更新
問題解決
WordPress 6.3+ PHP 7.4+ v0.1.1 上架:2023-04-03

內容簡介

Pattern Editor是一個WordPress外掛程式,可以協助使用者建立和編輯 WordPress 區塊編輯器的模式(patterns)。使用者可以像建立和編輯文章(post)一樣,註冊一個名為"Pattern"的新文章類型,並且單獨編輯這些模式。此外,也可以將模式直接儲存到活動子主題中,對於主題開發人員來說,這可以提供一個非常強大的設計系統。

問題與答案:
1. Pattern Editor 是什麼?
- Pattern Editor 是一個 WordPress 外掛程式。
2. Pattern Editor 的功能是什麼?
- 可以協助使用者建立和編輯 WordPress 區塊編輯器的模式,使用者可以像建立和編輯文章一樣,註冊一個名為"Pattern"的新文章類型,並且單獨編輯這些模式。
3. 模式可以儲存到哪裡?
- 模式可以直接儲存到活動子主題中。
4. Pattern Editor 適用於誰?
- Pattern Editor 適用於使用 WordPress 區塊編輯器的使用者和主題開發人員。
5. 文章類型是什麼?
- 文章類型是 WordPress 中的一種分類方式,可以將文章歸類為不同的類型,例如文章、頁面、模式等等。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Pattern Editor」→ 直接安裝(推薦)

原文外掛簡介

Pattern Editor is a plugin to help you create and edit patterns for WordPress block themes. It automatically exports patterns on save as PHP files to the active themes patterns directory.
It works with the built-in wp_block post type and adds some minimal UI features to make working with patterns easier. The new Block Pattern editor UI in the Site Editor is supported, and the wp_block post type screen is exposed in the admin menu for quick access.
Features

Exports assets (images, SVGs, videos) to the active theme’s assets directory.
Pattern front end previews.
Export patterns as PHP files.
Import patterns from PHP files.
Edit patterns in the block editor.
Can export to category subdirectories or a single directory.
Supports the new Block Pattern editor UI in the Site Editor.

Filters
blockify_pattern_export_use_category_dirs - Enable or disable the use of category directories for pattern exports. Default is `true`. If enabled, patterns will be exported to `patterns/{category}/{pattern-name}.php`. If disabled, patterns will be exported to `patterns/{category}-{pattern-name}.php`.

blockify_image_export_dir - Set the directory where images and assets are exported to. Default is `themes/$stylesheet/assets`. Images are saved to the `img` subdirectory, SVGs to the `svg` subdirectory, and videos to the `video` subdirectory.

blockify_pattern_export_content - Allows you to modify the content of the exported pattern file. The first parameter is the content of the pattern file, the second parameter is the pattern post object, and the third parameter is the pattern category slug.

More documentation coming soon.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon