Changeset 27709
- Timestamp:
- 03/25/2014 12:59:17 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r27708 r27709 713 713 */ 714 714 $tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args ); 715 if ( $tags_sorted != $tags ) { 715 if ( empty( $tags_sorted ) ) { 716 return $return; 717 } 718 719 if ( $tags_sorted !== $tags ) { 716 720 $tags = $tags_sorted; 717 unset( $tags_sorted);721 unset( $tags_sorted ); 718 722 } else { 719 if ( 'RAND' == $order ) {720 shuffle( $tags);723 if ( 'RAND' === $order ) { 724 shuffle( $tags ); 721 725 } else { 722 726 // SQL cannot save you; this is a second (potentially different) sort on a subset of data. 723 if ( 'name' == $orderby )727 if ( 'name' === $orderby ) { 724 728 uasort( $tags, '_wp_object_name_sort_cb' ); 725 else729 } else { 726 730 uasort( $tags, '_wp_object_count_sort_cb' ); 727 728 if ( 'DESC' == $order ) 731 } 732 733 if ( 'DESC' === $order ) { 729 734 $tags = array_reverse( $tags, true ); 735 } 730 736 } 731 737 }
Note: See TracChangeset
for help on using the changeset viewer.