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

Do not create revisions for the GlobalStyles CustomPostType #30132

Closed
oandregal opened this issue Mar 23, 2021 · 3 comments
Closed

Do not create revisions for the GlobalStyles CustomPostType #30132

oandregal opened this issue Mar 23, 2021 · 3 comments
Assignees
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress

Comments

@oandregal
Copy link
Member

oandregal commented Mar 23, 2021

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.
@oandregal oandregal added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Mar 23, 2021
@oandregal oandregal mentioned this issue Mar 23, 2021
82 tasks
@oandregal
Copy link
Member Author

Added it to the backlog at #20331

@oandregal
Copy link
Member Author

There's #30133 to close this.

@mtias
Copy link
Member

mtias commented Mar 23, 2021

Mmm, even if we are not using them, I don't think we should stop creating them. It'd be nice once we add UI to manage them that they are there already. This is a free rollback feature for the most part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants