__('Menu', 'adsoft_language') ); // Passing Parameters to Javascript wp_localize_script( 'adsoft_jquery_navigation', 'adsoftNavigationParams', $params ); } endif; // Passing Variables to Frontpage Slider ( js/slider.js) add_action('wp_enqueue_scripts', 'adsoft_custom_jscript_slider'); if ( ! function_exists( 'adsoft_custom_jscript_slider' ) ): function adsoft_custom_jscript_slider() { // Get Theme Options $options = get_option('adsoft_options'); // Set Parameters array $params = array(); // Define Slider Automatically if( isset($options['adsoft_frontpage_slider_automatically']) ) : $params['autoplay'] = esc_attr($options['adsoft_frontpage_slider_automatically']); endif; // Define Slider animSpeed if( isset($options['adsoft_frontpage_slide_speed']) ) : $params['slideSpeed'] = esc_attr($options['adsoft_frontpage_slide_speed']); endif; // Define Slider Pagination Speed if( isset($options['adsoft_frontpage_slider_pagination_speed']) ) : $params['paginationSpeed'] = esc_attr($options['adsoft_frontpage_slider_pagination_speed']); endif; // Define Slider Rewind Speed if( isset($options['adsoft_frontpage_slider_rewind_speed']) ) : $params['rewindSpeed'] = esc_attr($options['adsoft_frontpage_slider_rewind_speed']); endif; // Passing Parameters to Javascript wp_localize_script( 'adsoft_jquery_frontpage_slider', 'adsoftSliderParams', $params ); } endif; // Passing Variables to Load More Posts function( js/posts.js) add_action('wp_enqueue_scripts', 'adsoft_custom_jscript_posts'); if ( ! function_exists( 'adsoft_custom_jscript_posts' ) ): function adsoft_custom_jscript_posts() { // Get Pagination query if ( get_query_var('paged') ) : $paged = (int)get_query_var('paged'); else : $paged = 1; endif; // Get Frontpage Posts $tux_frontpage_posts_query = adsoft_frontpage_posts_query($paged); // Set max $max = $tux_frontpage_posts_query->max_num_pages; // Set Parameters array $params = array( 'loadMoreText' => __('Load More Posts', 'adsoft_language'), 'loadingText' => __('Loading posts...', 'adsoft_language'), 'noMoreText' => __('No more posts to load.', 'adsoft_language'), 'startPage' => $paged, 'maxPages' => $max, 'nextLink' => next_posts($max, false) ); // Passing Parameters to Javascript wp_localize_script( 'adsoft_jquery_load_posts', 'adsoftLoadPostsParams', $params ); } endif; ?>