$transition_effect, 'transition_delay' => $transition_delay, 'transition_duration' => $transition_duration ) ); }// catchflames_pass_slider_value /** * Shows Default Slider Demo if there is not iteam in Featured Post Slider */ function catchflames_default_sliders() { delete_transient( 'catchflames_default_sliders' ); if ( !$catchflames_default_sliders = get_transient( 'catchflames_default_sliders' ) ) { echo ''; $catchflames_default_sliders = ' '; set_transient( 'catchflames_default_sliders', $catchflames_default_sliders, 86940 ); } echo $catchflames_default_sliders; } // catchflames_default_sliders if ( ! function_exists( 'catchflames_page_sliders' ) ) : /** * Template for Featued Page Slider * * To override this in a child theme * simply create your own catchflames_page_sliders(), and that function will be used instead. * * @uses catchflames_header action to add it in the header * @since Catch Flames 1.0 */ function catchflames_page_sliders() { //delete_transient( 'catchflames_page_sliders' ); global $post, $catchflames_options_settings; $options = $catchflames_options_settings; if( ( !$catchflames_page_sliders = get_transient( 'catchflames_page_sliders' ) ) && !empty( $options[ 'featured_slider_page' ] ) ) { echo ''; $catchflames_page_sliders = ' '; set_transient( 'catchflames_page_sliders', $catchflames_page_sliders, 86940 ); } echo $catchflames_page_sliders; } // catchflames_page_sliders endif; if ( ! function_exists( 'catchflames_slider_display' ) ) : /** * Shows Slider */ function catchflames_slider_display() { global $post, $wp_query, $catchflames_options_settings; $options = $catchflames_options_settings; $slidertype = $options[ 'select_slider_type' ]; // get data value from theme options $enableslider = $options[ 'enable_slider' ]; // Front page displays in Reading Settings $page_on_front = get_option('page_on_front') ; $page_for_posts = get_option('page_for_posts'); // Get Page ID outside Loop $page_id = $wp_query->get_queried_object_id(); if ( ( $enableslider == 'enable-slider-allpage' ) || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && $enableslider == 'enable-slider-homepage' ) ) : // This function passes the value of slider effect to js file if ( function_exists( 'catchflames_pass_slider_value' ) ) : catchflames_pass_slider_value(); endif; if ( $slidertype == 'page-slider' ) { if ( !empty( $options[ 'featured_slider_page' ] ) && function_exists( 'catchflames_page_sliders' ) ) { catchflames_page_sliders(); } else { echo '

' . esc_attr__( 'You have selected Page Slider but you haven\'t added the Page ID in "Appearance => Theme Options => Featured Slider => Featured Page Slider Options"', 'catchflames' ) . '

'; } } else { catchflames_default_sliders(); } endif; } endif; // catchflames_slider_display add_action( 'catchflames_before_main', 'catchflames_slider_display', 40 );