Skip to content

Add ability to preview template in post editor for non administrators #60316

Closed

Description

@fabiankaegy

Description

Since the update to unify the PostTemplatePanel in #56817 administrators can preview the current template in post-editor.

Any non-administrator roles (anyone without the edit_theme_options capability) cannot preview the template because they are not allowed to access the template/template part/navigation rest endpoints.

Proposed solution

Open up view-only access to any of the custom post types that are used in the site editor to any other user roles with the edit_post capability.

Additionally some of the blocks such as core/template–part & core/navigation will need to be updated to include a view-only mode. #58037, #58485, #58301

Todos

Activity

  1. fabiankaegy commented on Mar 29, 2024

    @fabiankaegy
    MemberAuthor

    As @youknowriad suggested in #58301 (comment) I started by opening a PR that changes the permission callbacks of the template rest endpoint to allow view-only access to any users with the edit_post capability here: #60317

    Once that is merged we can continue in smaller chunks.

  2. moved this to 🏗️ In Progress in WordPress 6.6 Editor Taskson Mar 31, 2024
  3. fabiankaegy commented on Mar 31, 2024

    @fabiankaegy
    MemberAuthor

    Now that #60317 was approved and merged by a REST API maintainer I have created #60326 to add the preview mode to the template part block.

  4. moved this from 🏗️ In Progress to ✅ Done in WordPress 6.6 Editor Taskson Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions