Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#55806 closed enhancement (duplicate)

`get_pages` should use `WP_Query` internally

Reported by: spacedmonkey Owned by:
Priority: normal Milestone:
Component: Query Version:
Severity: normal Keywords:
Cc: Focuses:

Description

The function get_pages does raw database calls. It does not use the class WP_Query. This means that performance, bug fixes and filters are not applied to get_pages. To improve maintainability and reduce code, get_pages should be refactored to use WP_Query internally.

Change History (2)

#1 @SergeyBiryukov
4 years ago

Thanks for the ticket!

This was previously discussed in comment:8:ticket:32077, closed in favor of #12821. There are some patches on the latter ticket that could be used as a start. Should we continue there?

Also related: #40650.

#2 @peterwilsoncc
4 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

I fully endorse this, there is some helpful discussion on #12821 so will follow Sergey's suggestion to continue there.

Note: See TracTickets for help on using tickets.