[wp-trac] [WordPress Trac] #12821: Merge get_posts() and get_pages()

WordPress Trac noreply at wordpress.org
Mon May 22 10:01:24 UTC 2023


#12821: Merge get_posts() and get_pages()
-------------------------------------------------+-------------------------
 Reporter:  mikeschinkel                         |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.3
Component:  Posts, Post Types                    |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  needs-dev-note has-patch has-unit-   |     Focuses:
  tests needs-testing dev-feedback commit        |  performance
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 In [changeset:"55845" 55845]:
 {{{
 #!CommitTicketReference repository="" revision="55845"
 Posts, Post Types: Add a new filter for query arguments in `get_pages`.

 In [55569] `get_pages` was converted to use `WP_Query` internally. But for
 plugins that were extending the `get_pages` filters and filter `WP_Query`
 query arguments, this could result in a conflict. Add a filter
 `get_pages_query_args` to allow developers to change arguments passed to
 `WP_Query` but also have the context of the original arguments passed to
 the `get_pages` function.

 This change also expands test coverage of `get_pages` to ensure no
 breakages in the future.

 Props spacedmonkey, westonruter, costdev, flixos90, kenwins, marianne38.
 See #12821.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/12821#comment:95>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list