This plugin enables theme developers to ship patterns that behave as synced patterns (reusable blocks) while maintaining the benefits of theme-bundled patterns. When a theme pattern is marked as synced, it automatically becomes available as a reusable block that updates across all instances when modified.
To make a theme pattern synced, add Synced: true to the pattern file’s metadata header:
<?php
/**
* Title: My Synced Pattern
* Slug: mytheme/my-pattern
* Categories: featured
* Synced: true
*/
?>
<!-- Your pattern blocks here -->
Reference synced patterns in templates or other patterns using the pattern block:
<!-- wp:pattern {"slug":"mytheme/my-pattern"} /--><h3>Development</h3>
The plugin source is available on GitHub.
Node & NPM are needed to install and run the development tools:
npm run start – Start the development environmentnpm run stop – Stop the development environmentnpm run test – Run unit tests (requires running environment)npm run build – Build production assetsSee the source for more details.