Opened 8 years ago
Closed 8 years ago
#43872 closed enhancement (fixed)
Add page template filter for all post types
| Reported by: | desrosj | Owned by: | desrosj |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9.6 |
| Component: | Themes | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch fixed-major |
| Cc: | Focuses: | template |
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
@
8 years ago
- Keywords has-patch added
- Milestone Awaiting Review → 5.0
- Owner set to
- Status new → assigned
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
43872.diff introduces a
theme_templatesfilter for filtering page templates regardless of post type.