WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
616 | if ( empty( $tags ) ) |
617 | return; |
618 |
|
619 | // SQL cannot save you; this is a second (potentially different) sort on a subset of data. |
620 | if ( 'name' == $orderby ) |
621 | uasort( $tags, create_function('$a, $b', 'return strnatcasecmp($a->name, $b->name);') ); |
622 | else |
623 | uasort( $tags, create_function('$a, $b', 'return ($a->count > $b->count);') ); |
624 |
|
625 | $tags = apply_filters( 'tag_cloud_sort', $tags, $args ); |
626 |
|
627 | if ( 'DESC' == $order ) |
628 | $tags = array_reverse( $tags, true ); |
629 | elseif ( 'RAND' == $order ) { |
630 | $keys = (array) array_rand( $tags, count( $tags ) ); |
631 | $temp = array(); |
632 | foreach ( $keys as $key ) |
633 | $temp[$key] = $tags[$key]; |
634 |
|