bb_tag_heat_map

The BuddyPress bb tag heat map function.

Description

bb_tag_heat_map( (string) $args = '' ); 

Parameters (1)

0. $args — Optional. (string) => ''
The args.

Usage

  1. if ( !function_exists( 'bb_tag_heat_map' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-template.php'; 
  3.  
  4. // The args. 
  5. $args = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_tag_heat_map($args); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function bb_tag_heat_map( $args = '' ) { 
  2. $_args = func_get_args(); 
  3. $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'limit' => 40, 'format' => 'flat' ); 
  4. $args = wp_parse_args( $args, $defaults ); 
  5.  
  6. if ( 1 < $fn = func_num_args() ) : // For back compat 
  7. $args['smallest'] = $_args[0]; 
  8. $args['largest'] = $_args[1]; 
  9. $args['unit'] = 2 < $fn ? $_args[2] : $unit; 
  10. $args['limit'] = 3 < $fn ? $_args[3] : $limit; 
  11. endif; 
  12.  
  13. extract($args, EXTR_SKIP); 
  14.  
  15. $tags = bb_get_top_tags( array( 'number' => $limit ) ); 
  16.  
  17. if ( empty($tags) ) 
  18. return; 
  19.  
  20. $r = bb_get_tag_heat_map( $tags, $args ); 
  21. echo apply_filters( 'tag_heat_map', $r, $args );