Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_tag_cloud

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
343
344      if ( empty($tags) )
345           return;
346
347      $return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
348
349      if ( is_wp_error( $return ) )
350           return false;
351
352      $return = apply_filters( 'wp_tag_cloud', $return, $args );
353
354      if ( 'array' == $args['format'] )
355           return $return;
356
357      echo $return;
358 }
359
360 // $tags = prefetched tag array ( get_tags() )
361 // $args['format'] = 'flat' => whitespace separated, 'list' => UL, 'array' => array()