Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: tag_cloud_sort

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
628           $args['topic_count_text_callback'] = create_function('$count', $body);
629      }
630
631      $args = wp_parse_args( $args, $defaults );
632      extract( $args );
633
634      if ( empty( $tags ) )
635           return;
636
637      $tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args );
638      if ( $tags_sorted != $tags  ) { // the tags have been sorted by a plugin
639           $tags = $tags_sorted;
640           unset($tags_sorted);
641      } else {
642           if ( 'RAND' == $order ) {
643                shuffle($tags);
644           } else {
645                // SQL cannot save you; this is a second (potentially different) sort on a subset of data.
646                if ( 'name' == $orderby )