Skip to content

Cleanup Theme Export #162

@mikachan

Description

@mikachan

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions