Use _wp_tag_cloud_count_sort_cb instead of an anonymous function. Props ocean90. see #14424
git-svn-id: http://svn.automattic.com/wordpress/trunk@18814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b26dcf5ce6
commit
476b3d9a65
|
@ -642,9 +642,9 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
|
||||||
} else {
|
} else {
|
||||||
// SQL cannot save you; this is a second (potentially different) sort on a subset of data.
|
// SQL cannot save you; this is a second (potentially different) sort on a subset of data.
|
||||||
if ( 'name' == $orderby )
|
if ( 'name' == $orderby )
|
||||||
uasort( $tags, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);') );
|
uasort( $tags, '_wp_tag_cloud_name_sort_cb' );
|
||||||
else
|
else
|
||||||
uasort( $tags, create_function('$a, $b', 'return ($a->count > $b->count);') );
|
uasort( $tags, '_wp_tag_cloud_count_sort_cb' );
|
||||||
|
|
||||||
if ( 'DESC' == $order )
|
if ( 'DESC' == $order )
|
||||||
$tags = array_reverse( $tags, true );
|
$tags = array_reverse( $tags, true );
|
||||||
|
|
Loading…
Reference in New Issue