wp_list_sort


wp_list_sort ( $list, $orderby = array(), $order = 'ASC', $preserve_keys = false )

Parameters:
  • (array) $list An array of objects to filter.
  • (string|array) $orderby Optional. Either the field name to order by or an array of multiple orderby fields as $orderby => $order.
  • (string) $order Optional. Either 'ASC' or 'DESC'. Only used if $orderby is a string.
  • (bool) $preserve_keys Optional. Whether to preserve keys. Default false.
Returns:
  • (array) The sorted array.
Defined at:

Description

Sorts a list of objects, based on one or more orderby arguments.

Related Functions

wp_list_cats, wp_list_authors, wp_playlist_shortcode, wp_list_pages, wp_playlist_scripts

Top Google Results

User discussions

wpseek mobile