mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@38859 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -91,6 +91,7 @@ wp_set_lang_dir();
|
||||
|
||||
// Load early WordPress files.
|
||||
require( ABSPATH . WPINC . '/compat.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-list-util.php' );
|
||||
require( ABSPATH . WPINC . '/functions.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp.php' );
|
||||
|
||||
Reference in New Issue
Block a user