WPDev.one
Core Function
View Source on Trac ↗

wp_list_filter()

wp_list_filter( mixed $input_list, mixed $args = array(), mixed $operator = 'AND' )

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

Parameters 3 required

Name / Type Description
$input_list
array

An array of objects to filter.

Required
array

$args Optional. An array of key => value arguments to match against each object. Default empty array.

Required
string

$operator Optional. 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'.

Required

Return Value

(array)
Array of found values.

Function Information

Since Version
3.1.0
Source File
wp-includes/functions.php
Advertisement