bre_is_active_sidebar_and_empty

The Bootstrap Responsive eCommerce bre is active sidebar and empty function.

Description

bre_is_active_sidebar_and_empty( $sidebar_id ); 

Parameters (1)

0. $sidebar_id
The sidebar id.

Usage

  1. if ( !function_exists( 'bre_is_active_sidebar_and_empty' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // The sidebar id. 
  5. $sidebar_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bre_is_active_sidebar_and_empty($sidebar_id); 
  9.  

Defined (1)

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

/functions.php  
  1. function bre_is_active_sidebar_and_empty( $sidebar_id ) { 
  2. if ( ! is_active_sidebar( $sidebar_id ) ) return ''; 
  3. ob_start(); 
  4. dynamic_sidebar( $sidebar_id ); 
  5. $out = ob_get_clean(); 
  6. return trim( $out );