Skip to content
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

Closed
6 tasks done
mikachan opened this issue Dec 15, 2022 · 4 comments · Fixed by #522
Closed
6 tasks done

Cleanup Theme Export #162

mikachan opened this issue Dec 15, 2022 · 4 comments · Fixed by #522
Labels
enhancement New feature or request [Priority] High
Milestone

Comments

@mikachan
Copy link
Member

mikachan commented Dec 15, 2022

Currently, an exported theme includes attributes such as ref and id for certain blocks, but these have no context outside of the environment where the theme was built. They can also break some blocks (a ref 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:

  • Remove ref attributes from the Navigation block
  • Remove id attributes from Image and Cover blocks
  • Remove wp-image-[id] classes from Image and Cover blocks
  • Remove category IDs from query blocks
  • Remove taxQuery attribute from query blocks
  • Remove queryId attributes from Query block I don't think this needs removing, see Theme Export: Strip out site specific details gutenberg#42730 (comment) for more details.
@mikachan mikachan added the enhancement New feature or request label Dec 15, 2022
@MaggieCabrera
Copy link
Contributor

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 ?

@scruffian
Copy link
Contributor

I agree!

@mikachan
Copy link
Member Author

Makes sense! I'll replicate the issue over there.

@mikachan
Copy link
Member Author

Already exists 😁 WordPress/gutenberg#42730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request [Priority] High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants