WPDev.one
Core Class

WP_List_Util

class WP_List_Util // Constructor: function Object() { [native code] }

List utility.

Methods 7 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $input: mixed
get_input()
array

Returns the original input array.

get_output()
array

Returns the output array.

filter()
array

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

Parameters: $args: mixed, $operator: mixed
pluck()
array

Plucks a certain field out of each element in the input array.

Parameters: $field: mixed, $index_key: mixed
sort()
array

Sorts the input array based on one or more orderby arguments.

Parameters: $orderby: mixed, $order: mixed, $preserve_keys: mixed
sort_callback()
int

Callback to sort an array by specific fields.

Parameters: $a: mixed, $b: mixed

Properties

Property / Type Description
$input
mixed
public
No description available.
$output
mixed
public
No description available.
$orderby
mixed
public
No description available.

Class Information

Since Version
4.7.0
Source File
wp-includes/class-wp-list-util.php
Advertisement