Make WordPress Core


Ignore:
Timestamp:
10/21/2016 11:11:42 AM (8 years ago)
Author:
swissspidy
Message:

General: Introduce a wp_list_sort() helper function.

In addition to wp_list_filter() for filtering a list of objects, and wp_list_pluck() for plucking a certain field out of each object in a list, this new function can be used for sorting a list of objects by specific fields. These functions are now all contained within the new WP_List_Util() class and wp_list_sort() is used in various parts of core for sorting lists.

Props flixos90, DrewAPicture, jorbin.
Fixes #37128.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r38832 r38859  
    9292// Load early WordPress files.
    9393require( ABSPATH . WPINC . '/compat.php' );
     94require( ABSPATH . WPINC . '/class-wp-list-util.php' );
    9495require( ABSPATH . WPINC . '/functions.php' );
    9596require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
Note: See TracChangeset for help on using the changeset viewer.