Changeset 18815
- Timestamp:
- 09/29/2011 05:20:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r18814 r18815 643 643 // SQL cannot save you; this is a second (potentially different) sort on a subset of data. 644 644 if ( 'name' == $orderby ) 645 uasort( $tags, '_wp_ tag_cloud_name_sort_cb' );645 uasort( $tags, '_wp_object_name_sort_cb' ); 646 646 else 647 uasort( $tags, '_wp_ tag_cloud_count_sort_cb' );647 uasort( $tags, '_wp_object_count_sort_cb' ); 648 648 649 649 if ( 'DESC' == $order ) … … 705 705 706 706 /** 707 * Callback for comparing tags based on name707 * Callback for comparing objects based on name 708 708 * 709 709 * @since 3.1.0 710 710 * @access private 711 711 */ 712 function _wp_ tag_cloud_name_sort_cb( $a, $b ) {712 function _wp_object_name_sort_cb( $a, $b ) { 713 713 return strnatcasecmp( $a->name, $b->name ); 714 714 } 715 715 716 716 /** 717 * Callback for comparing tags based on count717 * Callback for comparing objects based on count 718 718 * 719 719 * @since 3.1.0 720 720 * @access private 721 721 */ 722 function _wp_ tag_cloud_count_sort_cb( $a, $b ) {722 function _wp_object_count_sort_cb( $a, $b ) { 723 723 return ( $a->count > $b->count ); 724 724 }
Note: See TracChangeset
for help on using the changeset viewer.