Skip to content

Expose the Site Editor Patterns page to all users #61637

@t-hamano

Description

@t-hamano

Further improve #52150

What problem does this address?

#52150 aims to expose the Site Editor Patterns page for every "theme".

However, currently the Site Editor is only accessible to admin users. For non-admin users, links related to the Pattern page link to the classic post list (edit.php?post_type=wp_block).

What is your proposed solution?

We should be able to remove this restriction and allow all users to access the Site Editor Patterns page.

To achieve this, I think we need to implement at least the following points:

  • Even if the current theme is a block theme, non-admin users are not allowed to access anything other than the Patterns page.
  • Check capabilities to restrict actions such as creating, duplicating, deleting, and editing patterns. The "wp_block" post type has complex capabilities.
  • Implement redirects in case the post list page is bookmarked or the post list page is hard-coded by third-party product developers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions