[wp-trac] [WordPress Trac] #37128: Introduce helper function `wp_list_sort()`
WordPress Trac
noreply at wordpress.org
Fri Oct 21 23:54:06 UTC 2016
#37128: Introduce helper function `wp_list_sort()`
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: swissspidy
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses:
needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by flixos90):
[attachment:37128.4.diff] fixes the failing unit tests (related to PHP
unstable sorting). It also adds a `$preserve_keys` parameter to
`wp_list_sort()` (if true, `uasort()` is used). This parameter is provided
as such in the relevant functions in `WP_Customize_Manager`.
Note that this patch now contains both the basic implementation plus the
usage in the rest of Core to make maintenance easier.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37128#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list