Go to file
Dominik Schilling (ocean90) ad25902a65 General: Introduce a `wp_list_sort()` helper function, v2.
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.

This was previously committed in [38859] but got reverted in [38862] and [38863]. To fix the previous issues, `wp_list_sort()` supports now an additional argument to preserve array keys via `uasort()`.

Props flixos90, DrewAPicture, jorbin.
Fixes #37128.

git-svn-id: https://develop.svn.wordpress.org/trunk@38928 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 21:25:25 +00:00
src General: Introduce a `wp_list_sort()` helper function, v2. 2016-10-25 21:25:25 +00:00
tests General: Introduce a `wp_list_sort()` helper function, v2. 2016-10-25 21:25:25 +00:00
tools/i18n DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:49:09 +00:00
.editorconfig Use HTTPS URLs for codex.wordpress.org. 2015-04-12 21:28:58 +00:00
.gitignore Revert [38401] after [38480]. 2016-09-06 18:12:09 +00:00
.jshintrc Build: Prevent non-breaking spaces from accidentally being inserted into JavaScript files. 2015-11-12 12:04:55 +00:00
.travis.yml Build/Test Tools: Ensure PHP 7.1 is tested on Travis. 2016-08-17 20:45:07 +00:00
Gruntfile.js Build/Test Tools: Allow Minimal Builds 2016-10-20 22:23:21 +00:00
package.json Build/Test: Bump Autoprefixer to 6.5.0 2016-09-30 17:33:57 +00:00
phpunit.xml.dist oEmbed: Remove the oEmbed provider unit tests. 2016-10-20 09:15:10 +00:00
wp-cli.yml Remove debug mode from WP-CLI by default, as it now outputs too much debugging information to be of use during normal development. 2015-11-28 18:36:06 +00:00
wp-config-sample.php Lightly clean up and improve inline documentation in wp-config-sample.php. 2015-05-10 00:05:30 +00:00
wp-tests-config-sample.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00