Ticket #2562 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Add "only" option to get_*() functions

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

Description

Add an "only" option that contains a list of IDs to include in list queries. This is similar to the existing "exclude" option except instead of excluding IDs from the query it restricts the query to only those IDs specified. get_posts(), get_pages(), get_categories(), and get_bookmarks() need this option.

Attachments

template_functions_bookmark_incl_excl.diff (2.0 kB) - added by MichaelH on 03/18/06 21:14:19.
adds exclusion/inclusion to get_bookmarks()
incl_excl_gets.diff (9.2 kB) - added by MichaelH on 03/20/06 17:20:58.
include/exclude ids for get_posts(), get_pages(), get_categories(), and get_bookmarks()

Change History

03/18/06 21:14:19 changed by MichaelH

  • attachment template_functions_bookmark_incl_excl.diff added.

adds exclusion/inclusion to get_bookmarks()

03/18/06 21:15:27 changed by MichaelH

Just a patch for get_bookmarks(). Allows exclusions (which was partially coded) or inclusions. If 'include' is specified in the parameter, sets $exclude = , $category = -1, and $category_name = .

03/20/06 17:20:58 changed by MichaelH

  • attachment incl_excl_gets.diff added.

include/exclude ids for get_posts(), get_pages(), get_categories(), and get_bookmarks()

03/20/06 17:26:50 changed by MichaelH

  • keywords changed from query get api to query get api bg|has-patch bg|needs testing.

A patch for get_posts(), get_pages(), get_categories(), and get_bookmarks() to include/exclude specific ids.

03/21/06 00:23:33 changed by ryan

Code looks good. Time to test.

03/21/06 04:26:55 changed by ryan

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

(In [3655]) Add include param to get_posts(), get_categories(), get_pages(), and get_bookmarks(). Props MichaelH. fixes #2562