Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#6773 closed defect (bug) (fixed)

get_pages fixes

Reported by: filosofo's profile filosofo Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: General Keywords: get_pages has-patch
Focuses: Cc:

Description

get_pages queries don't work as expected:

  • meta_key and meta_value are listed as separate potential parameters, but they have to be used together, or you get really odd behavior. One should be able to use them separately, as in the following example, which should return an array of pages with the meta_key of 'whatever':

$pages = get_pages(array('meta_key' => 'whatever'));

The above fails fatally.

  • LEFT JOIN is more efficient

Attachments (1)

get_pages.diff (1.5 KB) - added by filosofo 17 years ago.

Download all attachments as: .zip

Change History (2)

@filosofo
17 years ago

#1 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7746]) Fix meta_key and meta_value queries in get_pages(). Props filosofo. fixes #6773 for trunk

Note: See TracTickets for help on using tickets.