-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Do not create revisions for the GlobalStyles CustomPostType #30132
Copy link
Copy link
Closed
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progressTracking issues with work in progress
Description
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_poststable by thepost_modifiedfield in descending order. - Verify that the user changes have updated the global styles CTP:
wp-global-styles-tt1-blocksaspost_nameand that a revision was created as well (post_name along the lines of<post_type_id_of_global_styles_cpt>-revision-v1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progressTracking issues with work in progress
Type
Fields
Give feedbackNo fields configured for issues without a type.