-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FSE: Strip post ids from template part blocks on export. #26268
FSE: Strip post ids from template part blocks on export. #26268
Conversation
This ensures that exported FSE themes work on other sites.
Thanks for the PR. I've tested it manually and functions as expected on my end; the postids are no longer included in the template-part. (Made edits to the footer and header both through https://site.test/wp-admin/admin.php?page=gutenberg-edit-site and through https://site.test/wp-admin/edit.php?post_type=wp_template_part ; then exported the zip. |
I'd love some thoughts about how to make this more generic across blocks. the same issue can happen for reusable blocks for instance and even more complex for image blocks (and other media blocks) where the id is in the markup. |
Thinking more, I guess you could argue that the template parts are a bit special in the sense that they are actually already exported as files to the themes. So yeah, this might have more priority. I didn't test but I'm on board with this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in. Seems like a decent fix for now.
This ensures that exported FSE themes work on other sites.
Description
Fixes the export of FSE themes so that they can be activated on other sites
How has this been tested?
Tested:
Types of changes
Bug fix: Fixes the issue outlined in #25845.
Checklist: