-
Notifications
You must be signed in to change notification settings - Fork 44
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
Cleanup Theme Export #162
Labels
Milestone
Comments
I think this could be a gutenberg PR, since this plugin is already using the export functions, it makes sense that what gets exported is usable outside of the context where it was exported from. Do you agree @scruffian ? |
I agree! |
Makes sense! I'll replicate the issue over there. |
Already exists 😁 WordPress/gutenberg#42730 |
Closed
pbking
changed the title
Remove environment-specific attributes from block markup
Cleanup Theme Export
Mar 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, an exported theme includes attributes such as
ref
andid
for certain blocks, but these have no context outside of the environment where the theme was built. They can also break some blocks (aref
in a nav block that doesn't exist on a different WordPress instance will currently cause the nav block to break).Here are the cases I can think of, but there may be more:
ref
attributes from the Navigation blockid
attributes from Image and Cover blockswp-image-[id]
classes from Image and Cover blockscategory
IDs from query blockstaxQuery
attribute from query blocksRemoveI don't think this needs removing, see Theme Export: Strip out site specific details gutenberg#42730 (comment) for more details.queryId
attributes from Query blockThe text was updated successfully, but these errors were encountered: