Pattern Add Output
管理画面で作成したパターン(wp_block)を、テーマの /patterns フォルダ用PHPファイルとして出力します。
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/yukiuota/pattern_add_output/archive/refs/heads/main.zipReadme
Pattern Add Output
管理画面で作成したパターン(wp_block 投稿)を、テーマの /patterns フォルダ用 PHP ファイルとして出力する WordPress プラグインです。
エディターの「パターンを作成」で作ったパターンを一覧化し、所定のヘッダーコメント付き PHP ファイルとしてテーマへ書き出す開発支援ツールです。
機能
- パターンごとに Title / Slug / Categories / Keywords / Viewport Width / Block Types / Post Types / Template Types / Inserter を設定してヘッダーに反映
- WP_Filesystem 経由でテーマへ直接書き込み。書き込めない環境では PHP ファイルのダウンロードにフォールバック
- 一括出力・ZIP 一括ダウンロードに対応
- 出力先は有効テーマ(子テーマ)または親テーマを選択可能
動作要件
- WordPress 6.5 以上
- PHP 7.4 以上
edit_theme_options権限を持つユーザーのみ利用できますDISALLOW_FILE_MODSが有効な環境ではダウンロード出力のみ利用できます
インストール
- このリポジトリを ZIP でダウンロード、または
wp-content/plugins/pattern-add-outputにクローンします - 管理画面の「プラグイン」から有効化します
- 「ツール」→「Pattern Add Output」から利用できます