WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/wp filter object list

Contents

Description

Filters a list of objects, based on a set of key => value arguments.

Usage

<?php wp_filter_object_list$list$args$operator$field ); ?>

Parameters

$list
(array) (required) An array of objects to filter
Default: None
$args
(array) (optional) An array of key => value arguments to match against each object
Default: array()
$operator
(string) (optional) The logical operation to perform. 'or' means only one element from the array needs to match; 'and' means all elements must match. The default is 'and'.
Default: and
$field
(boolean|string) (optional) A field from the object to place instead of the entire object
Default: false

Return Values

(array) 
A list of objects or object fields

Change Log

Since: 3.0

Source File

wp_filter_object_list() is located in wp-includes/functions.php