bwp_filter_tag_cloud

The Bootstrap Widget Styling bwp filter tag cloud function.

Description

bwp_filter_tag_cloud( $markup ); 

Parameters (1)

0. $markup
The markup.

Usage

  1. if ( !function_exists( 'bwp_filter_tag_cloud' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bootstrap-widget-styling/includes/bws-widget-filters.php'; 
  3.  
  4. // The markup. 
  5. $markup = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bwp_filter_tag_cloud($markup); 
  9.  

Defined (1)

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

/includes/bws-widget-filters.php  
  1. function bwp_filter_tag_cloud( $markup ) { 
  2. $regex = '/(<a[^>]+?>)([^<]+?)(<\/a>)/' ; 
  3. $replace_with = "$1<span class='label label-primary'>$2</span>$3" ; 
  4. $markup = preg_replace( $regex , $replace_with , $markup ) ; 
  5. return $markup ;