[wp-trac] [WordPress Trac] #12821: Merge get_posts() and get_pages() (was: Allow get_pages() to query non-heirarchical post types?)
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 10 04:07:34 UTC 2010
#12821: Merge get_posts() and get_pages()
--------------------------+-------------------------------------------------
Reporter: mikeschinkel | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.1
Component: Post Types | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+-------------------------------------------------
Changes (by nacin):
* status: closed => reopened
* resolution: wontfix =>
* milestone: => 3.1
Old description:
> It seems "hierarchical" is an optional argument and yet get_pages()
> checks for non-hierarchical post types and if so exits. Is there a
> reason for get_pages() not to support non-heirachical post types? Seem
> like it might be a legacy concern prior to custom post types?
>
> FYI, I changed my custom post type where I ran into this to be
> hierarchical just to test it and it worked fine but that custom post type
> really should be hierarchical.
New description:
get_pages() should wrap get_posts() the same way get_page() wraps
get_post(). Arguments of different names need to be retained for back
compat.
Reasoning for this includes #14823. Querying a nonhierarchical post type
should still be allowed with child_of for example, to allow for cross-type
relationships.
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12821#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list