-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try: Add synced patterns to theme on save (#675)
* Add savePatterns option * Add basic add_patterns_to_theme function * Switch order of save options * Add prepare_pattern_for_export function * Copy media to theme filesystem * Fix pattern slug * Add replace_local_pattern_references * Tidy up pattern_from_wp_block * Add pattern categories * Default to empty string for categories list * Potentially save pattern sync status * Refactor PHP content of pattern_from_template Co-Authored-By: Elliott Richmond <[email protected]> * Refactor PHP content of pattern_from_wp_block Co-Authored-By: Elliott Richmond <[email protected]> * Delete synced patterns after adding to theme Co-Authored-By: Elliott Richmond <[email protected]> * Refactor and add error handling * Update save patterns option description * Remove pattern- prefix * Update option description * Redirect to patterns page if editing a pattern * Add check for preference.savePatterns * Update templates that reference the pattern --------- Co-authored-by: Elliott Richmond <[email protected]>
- Loading branch information
1 parent
4911a06
commit 2ba5e3a
Showing
4 changed files
with
226 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters