Opened 20 years ago
Closed 19 years ago
#3335 closed enhancement (fixed)
Add condition function(s) for page templates
| Reported by: | jimisola | Owned by: | westi |
|---|---|---|---|
| Priority: | low | Milestone: | 2.5 |
| Component: | Template | Version: | |
| Severity: | minor | Keywords: | has-patch 2nd-opinion needs-testing |
| Cc: | Focuses: |
Description
There does not exist a condition function for Page Templates like there is for Page etc (see http://codex.wordpress.org/Conditional_Tags).
Not only me seem to be missing this functionality: http://wordpress.org/support/topic/55378?replies=5
Attachments (2)
Change History (8)
#1
@
20 years ago
- Keywords has-patch 2nd-opinion added
- Milestone → 2.2
- Owner changed from to
- Status new → assigned
#2
@
20 years ago
- Keywords 2nd-opinion removed
- Milestone 2.2 → 2.3
- Status assigned → new
Pushing to 2.3.
#3
@
19 years ago
- Component Administration → Template
- Keywords 2nd-opinion added
- Priority normal → low
#4
@
19 years ago
- Keywords needs-testing added
- Owner changed from to
- Status new → assigned
I have updated the patch here to include some documentation and to make the code more obvious.
I think we should try and ensure that all new template tags come with documentation.
I am not sure whether of not to punt this one out to 2.4
And as of yet it has had no testing.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Add is_page_template() function to find out if either it's a page template we're using, or if the current page template == the argument.