[wp-trac] [WordPress Trac] #12821: Merge get_posts() and get_pages()
WordPress Trac
noreply at wordpress.org
Tue Jul 1 20:05:56 UTC 2014
#12821: Merge get_posts() and get_pages()
-------------------------------------------------+-------------------------
Reporter: mikeschinkel | Owner: garyc40
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future
Component: Posts, Post Types | Release
Severity: normal | Version: 3.0
Keywords: needs-testing needs-patch needs- | Resolution:
unit-tests 3.8-early | Focuses:
-------------------------------------------------+-------------------------
Comment (by mdawaffe):
Not knowing about this ticket or the previous work, I created a patch that
makes `get_pages()` a wrapper for `WP_Query` (as `get_posts()` is
already).
Oddities in attachment:12821-wp-query.diff:
* Having to use `array_intersect_key()` on the arguments since
`wp_dropdown_pages()` has a `name` argument which is not compatible with
`WP_Query`'s. There are other ways to resolve this.
* Lack of `post_modified` sort in `WP_Query`.
* As written in this patch, the cacheing is handled a bit differently. I
think the post terms/meta are cached with this patch, but not in the
current version. We could change that with the `update_post_meta_cache`
and `update_post_term_cache` `WP_Query` arguments.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12821#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list