Opened 6 years ago
Closed 6 years ago
#43872 closed enhancement (fixed)
Add page template filter for all post types
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 4.9.6 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Themes | Keywords: | has-patch fixed-major |
Focuses: | template | Cc: |
Description
In 4.7, a dynamic filter was introduced that filters page templates. It would be great if there were a filter for all post types as well.
Use case: I have a page template in a theme that uses a class in a plugin. If the plugin is not present on the site, that page template should be filtered out of the page template list. Right now, you have to register a filter for every post type.
Related: #18375
Attachments (1)
Change History (7)
#1
@
6 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 5.0
- Owner set to desrosj
- Status changed from new to assigned
Note: See
TracTickets for help on using
tickets.
43872.diff introduces a
theme_templates
filter for filtering page templates regardless of post type.