[wp-trac] [WordPress Trac] #33045: New conditional tags for child/parent pages
WordPress Trac
noreply at wordpress.org
Wed Jan 27 22:30:35 UTC 2021
#33045: New conditional tags for child/parent pages
-------------------------------------------------+-------------------------
Reporter: ramiy | Owner: audrasjb
Type: enhancement | Status: accepted
Priority: normal | Milestone: 5.7
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-dev-note needs-docs | Focuses: template
needs-unit-tests |
-------------------------------------------------+-------------------------
Comment (by xkon):
Hey @ramiy, thanks but I've re-uploaded [attachment:"33045.8.diff"]. It
seems that they where not really needed as `get_post()` takes care of it
as it seems on it's own either way, so I reverted to the original :) with
the minor fix mentioned below.
@audrasjb I took a look on [attachment:"33045.7.diff"] and instead of
returning `$post->post_parent` it was returning `$post` again in
`get_post_parent()` so it wasn't working as expected.
I'll try to work on unit tests as well to get this ready :). It should be
good now though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33045#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list