get( 'Version' ), false); wp_enqueue_style('best-food-style', get_stylesheet_uri(),array('theta-style'), $theme_info->get( 'Version' ) ); wp_enqueue_style( 'best-food-custom-style', get_template_directory_uri() . '/css/custom_script.css' ); $custom_css = ''; $color = THEME_COLOR; //header css if ( get_theme_mod( 'theme_color',$color) ){ $color = esc_attr(get_theme_mod( 'theme_color',$color)) ; } $color_hover = theta_change_color($color,0.8); $color_rbg = theta_hex2rgb( $color ); $header_color_rbg = theta_hex2rgb( '#ffffff' ); $custom_css .= '.ct_woocommerce .nav-tabs>li>a{ border: 1px solid '.$color.'; border-bottom-color:'.$color.';} .ct_woocommerce .nav-tabs>li.active>a,.ct_woocommerce .nav-tabs>li.active>a:focus,.ct_woocommerce .nav-tabs>li.active>a:hover { background-color: '.$color.';border: 1px solid '.$color.';border-bottom-color:'.$color.' ;} section.ct_news p.ct_news_a a{color: '.$color.';}section.ct_news p.ct_news_a a:hover{color: '.$color_hover.';}'; if( is_front_page() ){ $custom_css .= ' #theta-top-search span.theta-close-search-field{ color:'.$color.';}#theta-top-search .theta-search-form input{ color:#EFEFEF;} header.fixed{background-color:transparent;} header.changeh{background-color:rgba(0,0,0,0.5) ; } '; } // get sction live css $sortable_value = maybe_unserialize( get_theme_mod( 'home_layout', cts_section_default_order() ) ); if ( ! empty( $sortable_value ) ) : foreach ( $sortable_value as $checked_value ) : $custom_css .= best_food_section_live_css($checked_value); endforeach; endif; wp_add_inline_style( 'best-food-custom-style', $custom_css ); wp_enqueue_script('waypoints', get_stylesheet_directory_uri().'/custom/js/jquery.waypoints.min.js', array( 'jquery' ), '4.0.0', false ); wp_enqueue_script('parallax', get_stylesheet_directory_uri().'/custom/js/parallax.min.js', array( 'jquery' ), '1.5', false ); wp_enqueue_script('best-food-main', get_stylesheet_directory_uri().'/custom/js/main.js', array( 'jquery','bootstrap','theta-main' ),$theme_info->get( 'Version' ), true ); wp_add_inline_script( 'best-food-main', best_food_script_method() ); } add_action( 'wp_enqueue_scripts', 'best_food_custom_scripts' ); function best_food_script_method() { $custom_js = 'jQuery(document).ready(function($){'; //front-page $custom_js .= 'var height = jQuery(window).height(); var width = jQuery(window).width();'; if(is_front_page() ){ // get sction live js $sortable_value = maybe_unserialize( get_theme_mod( 'home_layout', cts_section_default_order() ) ); if ( ! empty( $sortable_value ) ) : foreach ( $sortable_value as $checked_value ) : $custom_js .= best_food_section_live_js($checked_value); endforeach; endif; } $custom_js .= '});'; return $custom_js; } if ( ! function_exists( 'best_food_get_section_menu' ) ) { function best_food_get_section_menu(){ $section_menu = ''; $sortable_value = maybe_unserialize( get_theme_mod( 'home_layout',cts_section_default_order() ) ); if ( ! empty( $sortable_value ) ) : foreach ( $sortable_value as $checked_value ) : $section_menu = '