You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Do not create revisions for the GlobalStyles CustomPostType #30132
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progress
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>.
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.
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.
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progress
Activity
oandregal commentedon Mar 23, 2021
Added it to the backlog at #20331
oandregal commentedon Mar 23, 2021
There's #30133 to close this.
mtias commentedon 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.