WordPress.org

Make WordPress Core

Changeset 6824


Ignore:
Timestamp:
02/13/2008 07:12:46 PM (10 years ago)
Author:
ryan
Message:

Add RAND order option to wp_tag_cloud(). Props fitzrev. fixes #5726

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r6693 r6824  
    375375    if ( 'DESC' == $order )
    376376        $counts = array_reverse( $counts, true );
     377    elseif ( 'RAND' == $order ) {
     378        $keys = array_rand( $counts, count($counts) );
     379        foreach ( $keys as $key )
     380            $temp[$key] = $counts[$key];
     381        $counts = $temp;
     382        unset($temp);
     383    }
    377384
    378385    $a = array();
Note: See TracChangeset for help on using the changeset viewer.