Skip to content

Do not create revisions for the GlobalStyles CustomPostType #30132

Closed

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.

Activity

  1. added
    Global Styles
    on Mar 23, 2021
  2. oandregal commented on Mar 23, 2021

    @oandregal
    MemberAuthor

    Added it to the backlog at #20331

  3. added
    [Status] In Progress
    on Mar 23, 2021
  4. oandregal commented on Mar 23, 2021

    @oandregal
    MemberAuthor

    There's #30133 to close this.

  5. mtias commented on Mar 23, 2021

    @mtias
    Member

    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

Metadata

Metadata

Assignees

Labels

Global Styles[Status] In Progress

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions