[wp-trac] [WordPress Trac] #33045: New conditional tags for child/parent pages
WordPress Trac
noreply at wordpress.org
Mon Feb 1 21:20:59 UTC 2021
#33045: New conditional tags for child/parent pages
-------------------------------------------------+-------------------------
Reporter: ramiy | Owner:
| johnbillion
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.7
Component: Posts, Post Types | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch needs-dev-note needs-docs | Focuses: template
has-unit-tests commit |
-------------------------------------------------+-------------------------
Changes (by johnbillion):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"50127" 50127]:
{{{
#!CommitTicketReference repository="" revision="50127"
Posts, Post Types: Introduce new functions for determining if a post has a
parent (`has_post_parent()`) and to fetch the post parent
(`get_post_parent()`).
These functions are simple but reduce the logic needed in themes and
plugins.
Props ramiy, sebastian.pisula, birgire, audrasjb, xkon
Fixes #33045
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33045#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list