[wp-trac] [WordPress Trac] #33045: New conditional tags for child/parent pages
WordPress Trac
noreply at wordpress.org
Sat Feb 13 17:08:37 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 |
-------------------------------------------------+-------------------------
Comment (by johnjamesjacoby):
Hey @johnbillion!
These functions are named weird. 😕
Your commit message uses `post_parent()` but the functions that were
committed use `parent_post()`.
I’ve read all of the comments in this ticket, and see it’s gone back and
forth until you put your foot down 3 years ago, but then your commit
message hilariously inverted them, and my intuition tells me that post-
parent is more natural than parent-post.
If left as-is, I think it is highly likely that everyone until the end of
time is going to get these function names wrong in their code-editor auto-
completes.
I.E. I would never think to type `get_status_post` and I’ll never remember
to type `get_parent_post`.
Thoughts?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33045#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list