catchresponsive_is_slider_active

Return true if slider is active.

Description

catchresponsive_is_slider_active( $control ); 

Parameters (1)

0. $control
The control.

Usage

  1. if ( !function_exists( 'catchresponsive_is_slider_active' ) ) { 
  2. require_once '/inc/customizer-includes/catchresponsive-customizer-active-callbacks.php'; 
  3.  
  4. // The control. 
  5. $control = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = catchresponsive_is_slider_active($control); 
  9.  

Defined (1)

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

/inc/customizer-includes/catchresponsive-customizer-active-callbacks.php  
  1. function catchresponsive_is_slider_active( $control ) { 
  2. global $wp_query; 
  3.  
  4. $page_id = $wp_query->get_queried_object_id(); 
  5.  
  6. // Front page display in Reading Settings 
  7. $page_for_posts = get_option('page_for_posts'); 
  8.  
  9. $enable = $control->manager->get_setting( 'catchresponsive_theme_options[featured_slider_option]' )->value(); 
  10.  
  11. //return true only if previwed page on customizer matches the type of slider option selected 
  12. return ( 'entire-site' == $enable || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && 'homepage' == $enable ) );