Skip to content

Make it more obvious in the site editor whether a template / template part is modified or reading from disk #66646

Open

Description

@fabiankaegy

Especially in larger WordPress installations we almost never want templates / template parts to get modified in a production environment. Because when you do so you get locked out of code updates. And the templates/template-parts are usually managed in Git.

Currently it is almost impossible without manually checking every single templates action dropdown menu whether the template has bee modified or not.

It would be great to add a new field to the DataView that indicates whether the template has been modified. This field doesn't need to be enabled by default. But it should be one of the options of the DataView.

Activity

  1. added
    [Feature] DataViews
    [Feature] Site Editor
    [Feature] Templates API
    [Type] Enhancement
    on Oct 31, 2024
  2. fabiankaegy commented on Oct 31, 2024

    @fabiankaegy
    MemberAuthor

    There is a hacky CSS was of achieving this which is basically doing:

    [aria-label="Templates"] .dataviews-view-grid__card:has(input[type="checkbox"][aria-disabled="false"]) {
    	border: 5px solid red !important;
    }

    Which uses the fact that any modified templates have the checkbox enabled where as unmodified has the checkbox disabled. But an actual native solution would be much preferred :)

  3. carolinan commented on Nov 25, 2024

    @carolinan
    Contributor

    I would find this helpful when developing themes and testing, since there is no "reset all templates" option.

  4. jasmussen commented on Nov 13, 2026

    @jasmussen
    Contributor

    I'm reopening this issue based on conversation in #39324.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] DataViews[Feature] Site Editor[Feature] Templates API[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions