Ticket #2563 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Add meta_key and meta_value options to get_posts() and get_pages()

Reported by: ryan Assigned to: MichaelH
Priority: normal Milestone: 2.1
Component: Administration Version: 2.0.1
Severity: normal Keywords: meta post page api query bg|has-patch bg|needs testing
Cc:

Description

Allow restricting post and page queries by meta keys and values. Example: get_posts('meta_key=foo&meta_value=bar')

Attachments

postmeta_val_test_get_posts_and_get_pages.diff (4.2 kB) - added by MichaelH on 03/21/06 20:06:33.
In get_posts() and get_pages() test meta_key and meta_value

Change History

03/21/06 18:47:42 changed by MichaelH

  • owner changed from anonymous to MichaelH.

03/21/06 20:06:33 changed by MichaelH

  • attachment postmeta_val_test_get_posts_and_get_pages.diff added.

In get_posts() and get_pages() test meta_key and meta_value

03/21/06 20:11:31 changed by MichaelH

  • keywords changed from meta post page api query to meta post page api query bg|has-patch bg|needs testing.

Patch allows one (1)'meta_key' and one (1) 'meta_value' parameter in get_posts() and get_pages(). If using 'include' parameter 'meta_key' and 'meta_value' are ignored.

03/21/06 20:22:24 changed by abhay

+1 tested on Apache 2.0.55 / PHP 5.1.2 / MySQL 5.0.19

03/21/06 22:46:41 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [3656]) Add meta_key and meta_value options to get_posts() and get_pages(). Props MichaelH. fixes #2563