Opened 9 years ago
Closed 9 years ago
#33625 closed feature request (fixed)
Add Edit link to page template meta box
Reported by: | sgrant | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
This patch adds an edit link beside the Template text on the page editor, similar to the Status/Visibility links. This feature was mentioned as a possibility by @matt in a recent WordCamp Q&A session. I tested this on a number of themes locally, but would love some feedback. Thanks!
Attachments (5)
Change History (19)
#3
@
9 years ago
As much as I am against removing the file editor, I also don't think it's something that we should encourage using past a certain point. Adding a link here in a frequent-use screen by default would IMO imply that this is a suggested action, not just a possible one.
#4
@
9 years ago
@helen I definitely see your point. I was hoping to tackle this with a plugin, but there's no hook here. What do you think about adding a filter into the meta box instead?
#5
@
9 years ago
@sgrant What would a general purpose hook here look like and what else could it be used for? Not against adding one, but I am wary of things that might only serve one real purpose. As a hacky way to do this, you can use the gettext
filter to "translate" Template
into another string (untested though).
#6
@
9 years ago
@helen Good and fair question! I guess the only use case I'd thought of immediately was adding the edit link. As precedent, preview_post_link is filtered earlier in meta-boxes.php, and is used in some cases to "repair" a bad preview URL. Although this is different, I suppose general use-cases here might be adding a link to the template file or adding a link to reset to the default template. Do you think this filter might be too speculative?
#11
@
9 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 34340:
#13
@
9 years ago
- Keywords needs-docs removed
- Resolution fixed deleted
- Status changed from closed to reopened
Seems like it might be good to also pass the current post here. This is done in 33625.diff.
Adds an Edit link for templates in the page editor