$transition_effect, 'transition_delay' => $transition_delay, 'transition_duration' => $transition_duration ) ); }// adventurous_pass_slider_value /** * Shows Default Slider Demo if there is not iteam in Featured Post Slider */ function adventurous_default_sliders() { //delete_transient( 'adventurous_default_sliders' ); if ( !$adventurous_default_sliders = get_transient( 'adventurous_default_sliders' ) ) { echo ''; $adventurous_default_sliders = '
Previous Next
'; set_transient( 'adventurous_default_sliders', $adventurous_default_sliders, 86940 ); } echo $adventurous_default_sliders; } // adventurous_default_sliders if ( ! function_exists( 'adventurous_post_sliders' ) ) : /** * Template for Featued Post Slider * * To override this in a child theme * simply create your own adventurous_post_sliders(), and that function will be used instead. * * @uses adventurous_header action to add it in the header * @since Adventurous 1.0 */ function adventurous_post_sliders() { //delete_transient( 'adventurous_post_sliders' ); if ( ! $output = get_transient( 'adventurous_post_sliders' ) ) { echo ''; global $post; $options = adventurous_get_options(); $output = '
Previous Next
'; set_transient( 'adventurous_post_sliders', $output, 86940 ); } echo $output; } // adventurous_post_sliders endif; if ( ! function_exists( 'adventurous_category_sliders' ) ) : /** * Template for Featued Category Slider * * To override this in a child theme * simply create your own adventurous_category_sliders(), and that function will be used instead. * * @uses adventurous_header action to add it in the header * @since Adventurous 1.0 */ function adventurous_category_sliders() { //delete_transient( 'adventurous_category_sliders' ); if ( ( !$adventurous_category_sliders = get_transient( 'adventurous_category_sliders' ) ) ) { echo ''; global $post; $options = adventurous_get_options(); $adventurous_category_sliders = '
Previous Next
'; set_transient( 'adventurous_category_sliders', $adventurous_category_sliders, 86940 ); } echo $adventurous_category_sliders; } // adventurous_category_sliders endif; if ( ! function_exists( 'adventurous_slider_display' ) ) : /** * Shows Slider */ function adventurous_slider_display() { global $post, $wp_query; $options = adventurous_get_options(); // get data value from theme options $enableslider = $options['enable_slider']; $slidertype = $options['select_slider_type']; // 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 ( ( 'enable-slider-allpage' == $enableslider ) || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && 'enable-slider-homepage' == $enableslider ) ) : // This function passes the value of slider effect to js file if ( function_exists( 'adventurous_pass_slider_value' ) ) : adventurous_pass_slider_value(); endif; if ( 'post-slider' == $slidertype ) { if ( !empty( $options['featured_slider'] ) && function_exists( 'adventurous_post_sliders' ) ) { adventurous_post_sliders(); } else { echo '

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

'; } } elseif ( 'category-slider' == $slidertype ) { if ( function_exists( 'adventurous_category_sliders' ) ) { adventurous_category_sliders(); } else { echo '

' . esc_attr__( 'You have selected Category Slider but you haven\'t selected any categories in "Appearance => Theme Options => Featured Slider => Featured Category Slider Options"', 'adventurous' ) . '

'; } } else { adventurous_default_sliders(); } endif; } endif; // adventurous_slider_display add_action( 'adventurous_before_main', 'adventurous_slider_display', 40 );