bb_sticky_label

The BuddyPress bb sticky label function.

Description

bb_sticky_label( $label ); 

Parameters (1)

0. $label
The label.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-formatting.php  
  1. function bb_sticky_label( $label ) { 
  2. global $topic; 
  3. if (bb_is_front()) { 
  4. if ( '2' === $topic->topic_sticky ) { 
  5. return sprintf(__('[sticky] %s'), $label); 
  6. } else { 
  7. if ( '1' === $topic->topic_sticky || '2' === $topic->topic_sticky ) { 
  8. return sprintf(__('[sticky] %s'), $label); 
  9. return $label;