Filters a list of objects, based on a set of key => value arguments.
Description
Retrieves the objects from the list that match the given arguments.Key represents property name, and value represents property value. If an object has more properties than those specified in arguments, that will not disqualify it. When using the 'AND' operator, any missing properties will disqualify it. When using the $field argument, this function can also retrieve a particular field from all matching objects, whereas wp_list_filter() only does the filtering.
Parameters
$input_listarray
An array of objects to filter.
$argsarrayoptional
An array of key => value arguments to match against each object. Default empty array.Default: array()
$operatorstringoptional
The logical operation to perform. 'AND' means all elements from the array must match. 'OR' means only one element needs to match. 'NOT' means no elements may match. Default 'AND'.Default: 'and'
$fieldbool|stringoptional
A field from the object to place instead of the entire object. Default false.Default: false
Signature, return type and hooks compared across 5 parsed releases.
4.7.0
Uses WP_List_Util class.from the docblock
3.0.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.