[wp-trac] [WordPress Trac] #12726: Add get_post_by_*() functions
WordPress Trac
noreply at wordpress.org
Fri Oct 11 01:07:05 UTC 2013
#12726: Add get_post_by_*() functions
-------------------------------------+-----------------------------
Reporter: mikeschinkel | Owner: sorich87
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future Release
Component: Post Types | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+-----------------------------
Comment (by ericlewis):
`get_page_by_path()` and `get_page_by_title()` have both allowed
$post_type to be passed as an argument since r13774. I don't see a lot of
benefit here, as there aren't any other unique identifying fields for
posts other than ID and post_name (making `get_page_by_title()`
problematic in my eyes, since it returns the first post with the given
title, ignoring multiple posts).
I'd say worksforme here, unless there are some good use cases I'm missing.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12726#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list