Skip to content

Do not create revisions for the GlobalStyles CustomPostType #30132

@oandregal

Description

@oandregal

We use a CustomPostType to store user data for global styles. The CPT post_type is global-styles and the post name is wp-global-styles-<theme-stylesheet>.

In #30088 (comment) @jeyip shared that he was seeing revisions stored for the CPT.

We're not using these revisions yet, so we should look into how/whether we can prevent them from being created.

How to test

  • Activate the TT1-blocks theme and go to the site editor.
  • Update something in the global styles sidebar and save (e.g.: change the root background).
  • Go to the database and sort the wp_posts table by the post_modified field in descending order.
  • Verify that the user changes have updated the global styles CTP: wp-global-styles-tt1-blocks as post_name and that a revision was created as well (post_name along the lines of <post_type_id_of_global_styles_cpt>-revision-v1.

Metadata

Metadata

Assignees

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progress

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions