Import, export and edit patterns with the Block Pattern custom post type with additional settings and UI features that makes working with WordPress bl …
Betyg
Senast uppdaterat
March 29, 2024
Version
0.1.1
Aktiva installationer
20
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.

Gratispå Creator-paket
Aktiva installationer
20
Testat upp till
6.4.5
Det här tillägget är tillgängligt för nedladdning och kan användas på din WordPress-installation som drivs på egen server.