Skip to content

Visual revisions: extender guidance needed for custom post types with custom editor sidebars #76785

@pavel-mailpoet

Description

@pavel-mailpoet

Description

WordPress 7.0 ships visual revisions, which work well for standard posts and pages. However, for custom post types that use a custom editor sidebar (built on top of @wordpress/editor but with their own sidebar panels), the visual revisions UI doesn't appear automatically.

For the revisions link to appear, two things are needed:

  1. The CPT must declare revisions support (this is on the extender)
  2. The editor sidebar must include the PostLastRevisionPanel component (or equivalent)

For extenders building a fully custom sidebar, there's no documentation on integrating the visual revisions panel.

What would be helpful

  • A public, stable component or hook for embedding the revisions panel in custom editor sidebars
  • Documentation for extenders on how to opt custom post types into visual revisions
  • Clarity on whether the revision preview is expected to work with custom post types that have template wrappers (e.g., email templates where the content is rendered inside a header/footer wrapper)

Context

We're building a WooCommerce email editor on top of Gutenberg. We'd like to leverage visual revisions but need a supported integration path.

Environment

WordPress 7.0 Beta 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] HistoryHistory, undo, redo, revisions, autosave.[Type] EnhancementA suggestion for improvement.

    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