Version, 'all' ); wp_deregister_style( 'kc-icon-1-css' ); wp_register_script( 'base-layout-js' , SCRIPTS . 'base-layout.js', false, wp_get_theme()->Version, true ); wp_enqueue_script( 'base-layout-js' ); wp_enqueue_script( 'greensock-TweenMax', SCRIPTS . 'greensock/TweenMax.min.js', array('jquery'), wp_get_theme()->Version, true ); wp_enqueue_script( "begro", SCRIPTS . 'mi.js', array('jquery'), wp_get_theme()->Version, true ); wp_enqueue_script( 'begro-skip-link-focus-fix', SCRIPTS . 'skip-link-focus-fix.js', array(), wp_get_theme()->Version, true ); wp_enqueue_script( 'begro-menu-arrow-nav', SCRIPTS . 'navigation.js', array('jquery'), wp_get_theme()->Version, true); wp_enqueue_script( 'ajax-form', SCRIPTS . 'ajax-form.js', array('jquery'), wp_get_theme()->Version, true ); wp_enqueue_script( 'main', SCRIPTS . 'main.js', array('jquery'), wp_get_theme()->Version, true ); wp_localize_script( 'ajax-form', 'theme', array('url' => home_url(),'themeUrl' => get_template_directory_uri(),'ajaxurl' => admin_url( 'admin-ajax.php' ))); } add_action( 'wp_enqueue_scripts', 'mi_load_scripts', 100); function theme_customize_style() { wp_enqueue_style('customize-styles', get_template_directory_uri() . '/css/customizer.css'); } add_action( 'customize_controls_enqueue_scripts', 'theme_customize_style' ); function begro_dynamic_styles() { wp_enqueue_style( 'style-dynamic', get_template_directory_uri() . '/css/style_dynamic.css' ); $logoHeight = get_theme_mod( 'logo_height' ); $bodyFont = get_theme_mod( 'body_google_font' ); $pFont = get_theme_mod( 'para_google_font' ); $h1Font = get_theme_mod( 'heading_one_google_font' ); $h2Font = get_theme_mod( 'heading_two_google_font' ); $h3Font = get_theme_mod( 'heading_three_google_font' ); $h4Font = get_theme_mod( 'heading_four_google_font' ); $h5Font = get_theme_mod( 'heading_five_google_font' ); $h6Font = get_theme_mod( 'heading_six_google_font' ); if($bodyFont !=''){$custom_inline_style = 'body {font-family: ' . $bodyFont . '; }';} if($pFont !=''){$custom_inline_style .= 'p {font-family: ' . $pFont . '; }';} if($h1Font !=''){$custom_inline_style .= 'h1{font-family: ' . $h1Font . '; }';} if($h2Font !=''){$custom_inline_style .= 'h2 {font-family: ' . $h2Font . '; }';} if($h3Font !=''){$custom_inline_style .= 'h3 {font-family: ' . $h3Font . '; }';} if($h4Font !=''){$custom_inline_style .= 'h4 {font-family: ' . $h4Font . '; }';} if($h5Font !=''){$custom_inline_style .= 'h5 {font-family: ' . $h5Font . '; }';} if($h6Font !=''){$custom_inline_style .= 'h6 {font-family: ' . $h6Font . '; }';} if($logoHeight !=''){ $custom_inline_style .= '.site-logo .navbar-brand img {height: ' . $logoHeight . '; }';} wp_add_inline_style( 'style-dynamic', $custom_inline_style ); } add_action( 'wp_enqueue_scripts', 'begro_dynamic_styles' , 200); function begro_customize_preview_js() { wp_enqueue_script( 'begro-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); } add_action( 'customize_preview_init', 'begro_customize_preview_js' ); // customer upgrade /** * Display upgrade notice on customizer page */ function begro_upsell_notice() { // Enqueue the script wp_enqueue_script( 'begro-customizer-upsell', get_template_directory_uri() . '/js/customizer.js', array(), '1.0.0', true ); // Localize the script wp_localize_script( 'begro-customizer-upsell', 'begroL10n', array( 'begroURL' => esc_url( 'https://midexigner.com' ), 'begroLabel' => __( 'Theme Upsell Coming soon', 'begro' ), ) ); } add_action( 'customize_controls_enqueue_scripts', 'begro_upsell_notice' );