[WordPress] 外掛分享: WordPress Block Patterns Plugin

首頁外掛目錄 › WordPress Block Patterns Plugin
WordPress 外掛 WordPress Block Patterns Plugin 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
2033 天前
最後更新
問題解決
WordPress 5.0+ v1.0 上架:2020-09-15

內容簡介

這個外掛包含多種不同的設計範本,從簡單的文字樣式到包含圖片和文字的較複雜樣式都有。

建立 WordPress 區塊樣式

將您的區塊樣式新增至此外掛

複製

https://github.com/Praison/Patterns

在本地機器上匯入您新的複製

git clone https://github.com/YOUR_USERNAME/Patterns.git
cd Patterns

連接到原始倉庫 https://github.com/Praison/Patterns

git remote add --track master upstream https://github.com/Praison/Patterns.git
git fetch upstream

為您的變更建立新分支

git checkout -b YOUR_USERNAME upstream/master

在 index.php 中新增您的區塊樣式

register_block_pattern(
'praison-gutenberg-block-patterns/TITLE-OF-YOUR-BLOCK-PATTERN', # 在小寫字詞之間加上連字號
array(
'title' => __( 'TITLE_OF_YOUR_BLOCK_PATTERN', 'praison-gutenberg-block-patterns' ),
'content' => "輸入 BLOCK PATTERN 內容",
'categories' => array("CATEGORY"), # 如:columns、text..等
)
);

新增、提交、推送

git add .
git commit -m "添加區塊樣式 TITLE_OF_YOUR_BLOCK"
git push -u origin YOUR_USERNAME

提交您的 Pull Request

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WordPress Block Patterns Plugin」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin contains patterns for you to check out, ranging from a simple text pattern to a more complex pattern containing both images and text.
Create WordPress Block Patterns
Add your block patterns to this plugin

Fork
https://github.com/Praison/Patterns

Clone your new fork locally
git clone https://github.com/YOUR_USERNAME/Patterns.git
cd Patterns

Connect to original repository https://github.com/Praison/Patterns
git remote add --track master upstream https://github.com/Praison/Patterns.git
git fetch upstream

Create a new branch for your changes
git checkout -b YOUR_USERNAME upstream/master

Add your block patterns in index.php
register_block_pattern(
'praison-gutenberg-block-patterns/TITLE-OF-YOUR-BLOCK-PATTERN', # Add Hyphens between lowercase words
array(
'title' => __( 'TITLE_OF_YOUR_BLOCK_PATTERN', 'praison-gutenberg-block-patterns' ),
'content' => "BLOCK_PATTERN_GOES_HERE",
'categories' => array("CATEGORY"), # eg: columns, text ..etc
)
);

Add, Commit, Push
git add .
git commit -m "Added block pattern TITLE_OF_YOUR_BLOCK"
git push -u origin YOUR_USERNAME

Submit your pull request

延伸相關外掛

文章
Filter
Apply Filters
Mastodon