Add RAND order option to wp_tag_cloud(). Props fitzrev. fixes #5726
git-svn-id: https://develop.svn.wordpress.org/trunk@6824 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c8f887c6a6
commit
4fa20e078a
|
@ -374,6 +374,13 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
|
|||
|
||||
if ( 'DESC' == $order )
|
||||
$counts = array_reverse( $counts, true );
|
||||
elseif ( 'RAND' == $order ) {
|
||||
$keys = array_rand( $counts, count($counts) );
|
||||
foreach ( $keys as $key )
|
||||
$temp[$key] = $counts[$key];
|
||||
$counts = $temp;
|
||||
unset($temp);
|
||||
}
|
||||
|
||||
$a = array();
|
||||
|
||||
|
|
Loading…
Reference in New Issue