aztecs_init_framework(); add_action('wp_enqueue_scripts', array($this, 'aztecs_init_theme_scripts_styles')); add_action('aztecs_load_homepage_sections', array($this, 'aztecs_load_homepage_sections')); add_action('customize_register', array($this, 'aztecs_customizer_register_sections')); add_action('admin_menu', array($this, 'aztecs_appearnace_menu')); add_action('wp_ajax_aztecs_default_section_content', array($this, 'aztecs_default_section_content')); add_action('wp_ajax_nopriv_aztecs_default_section_content', array($this, 'aztecs_default_section_content')); add_action( 'init', array($this, 'aztecs_export_theme_settings' )); add_filter("wp_nav_menu",array($this,'aztecs_nav_menu'),10,2); add_filter("nav_menu_css_class",array($this,'aztecs_li_menu_classes'),10,3); add_action( 'get_footer', array($this, 'aztecs_add_google_fonts_css' )); add_action( 'tgmpa_register', array($this,'aztecs_theme_register_required_plugins' ),15); } function aztecs_nav_menu( $nav_menu, $args ) { if( 'footer-page-menu' === $args->theme_location || 'footer' === $args->theme_location ){ return preg_replace('/theme_location) { return preg_replace('/title); return $classes; } function aztecs_init_framework() { require get_template_directory() . '/fst-framework/lib/fst-google-fonts.php'; require get_template_directory() . '/fst-framework/fst-customizer/fst-customizer.php' ; require get_template_directory() . '/fst-framework/fst-customize-control/fst-font-customizer.php'; require get_template_directory() . '/fst-framework/fst-customize-control/fst-alpha-color-customizer.php'; require get_template_directory() . '/fst-framework/fst-customize-control/fst-tinymce-customizer.php'; require get_template_directory() . '/fst-framework/fst-customize-control/fst-select-box-customizer.php'; if (!$this->aztecs_plugin_is_active('classic-editor')) { require get_template_directory() . '/fst-framework/fst-page-builder/index.php'; } /* For Post Comments Required Field */ require get_template_directory().'/fst-framework/inc/comment-form-validation/fst-comment-validation.php'; /* Demo import For XML Import */ require get_template_directory() . '/fst-framework/lib/xml_import/wordpress-importer-theme.php'; } function aztecs_plugin_is_active($plugin_var) { return in_array( $plugin_var. '/' .$plugin_var. '.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ); } function aztecs_init_theme_scripts_styles() { wp_enqueue_style( 'font-all-css', 'https://use.fontawesome.com/releases/v5.7.0/css/all.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'font-Hind', 'https://fonts.googleapis.com/css?family=Hind:300,400,500,600,700&display=swap', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'bootstrap-css', get_template_directory_uri(). '/assets/css/bootstrap.css', array(), '1.1', 'all'); wp_enqueue_style( 'bootstrap-min-css', get_template_directory_uri(). '/assets/css/bootstrap.min.css', array(), '1.1', 'all'); wp_enqueue_style( 'fst-owl.carousel-css', get_template_directory_uri(). '/assets/css/owl.carousel.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-owl.carousel-min-css', get_template_directory_uri(). '/assets/css/owl.carousel.min.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-slick-css', get_template_directory_uri(). '/assets/css/slick.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-slick-theme-css', get_template_directory_uri(). '/assets/css/slick-theme.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-animate-css', get_template_directory_uri(). '/assets/css/animate.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-animate-min-css', get_template_directory_uri(). '/assets/css/animate.min.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-style-css', get_template_directory_uri(). '/style.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-template-css', get_template_directory_uri(). '/assets/css/template.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fst-responsive-css', get_template_directory_uri(). '/assets/css/responsive.css', $deps = array(), THEME_VERSION ); wp_enqueue_script( 'fst-popper-js', get_template_directory_uri() . '/assets/js/popper.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-popper-min-js', get_template_directory_uri() . '/assets/js/popper.min.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-bootstrap-js', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-bootstrap-min-js', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-owl.carousel-js', get_template_directory_uri() . '/assets/js/owl.carousel.js', array('jquery'), THEME_VERSION, true); wp_enqueue_script( 'fst-owl.carousel-min-js', get_template_directory_uri() . '/assets/js/owl.carousel.min.js', array('jquery'), THEME_VERSION, true); wp_enqueue_script( 'fst-numscroller-js', get_template_directory_uri() . '/assets/js/numscroller-1.0.js', array('jquery'), THEME_VERSION, true); wp_enqueue_script( 'fst-slick-js', get_template_directory_uri() . '/assets/js/slick.js', array('jquery'), THEME_VERSION, true); wp_enqueue_script( 'fst-wow-js', get_template_directory_uri() . '/assets/js/wow.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-wow-min-js', get_template_directory_uri() . '/assets/js/wow.min.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-main-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-jquery-lazyload-js', get_template_directory_uri() . '/fst-framework/fst-customizer/assets/js/jquery.lazyload.js', array('jquery'), THEME_VERSION, true ); wp_enqueue_script( 'fst-default-js', get_template_directory_uri() . '/fst-framework/fst-customizer/assets/js/fst-default.js', array('jquery'), THEME_VERSION, true ); wp_register_script('mediaelement', plugins_url('wp-mediaelement.min.js', __FILE__), array('jquery'), '4.8.2', true); wp_enqueue_script('mediaelement'); wp_localize_script('fst-main-js','ajax_obj',array( 'ajaxurl' =>admin_url( 'admin-ajax.php' ),'ajax_nonce' =>wp_create_nonce('any_value_here') )); wp_localize_script( 'fst-customizer-js', 'sections_class', array() ); wp_localize_script( 'fst-pro-js', 'pro_url', AZTECS_PRO_URL ); if ( ( ! is_admin() ) && is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } function aztecs_add_google_fonts_css() { $font_arr = array(); $font_family = 'Hind'; $font_family_section_heading = 'Hind'; $body_font_family_setting = get_theme_mod('body_font_family_setting',$font_family); $heading_font_family_setting = get_theme_mod('heading_font_family_setting',$font_family); $btn_font_family_setting = get_theme_mod('btn_font_family_setting',$font_family); $menu_text_font_family_setting = get_theme_mod('menu_text_font_family1',$font_family); $section_heading_font_family = get_theme_mod('section_heading_font_family_setting',$font_family_section_heading); $font_arr = array( $body_font_family_setting => 1, $heading_font_family_setting => 1, $section_heading_font_family => 1, $btn_font_family_setting => 1, $menu_text_font_family_setting => 1 ); if (count($font_arr) > 0) { foreach ($font_arr as $key => $value) { if ($key) { wp_enqueue_style( "google-font-".$key."//fonts.googleapis.com/css?family=".$key.":200,300,400,500,600,700",true,"1.1","all"); } } } } function aztecs_customizer_register_sections($wp_customize) { /* For Slider */ $customizer_section1 = 'section_home_section_1'; $section_setting_slug1 = 'front_page_load_sections[section_1]'; $section_control_slug1 = 'home_section_1'; $wp_customize->add_section($customizer_section1, array( 'title' => __('SLIDER', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug1."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug1.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[display]', ) ); $wp_customize->add_setting($section_setting_slug1.'[slider_loop]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug1.'_slider_loop', array( 'label' => __( 'Loop', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_loop]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug1.'[slider_nav]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug1.'_slider_nav', array( 'label' => __( 'Nav', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_nav]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug1.'[slider_dots]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug1.'_slider_dots', array( 'label' => __( 'Dots', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_dots]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug1.'[slider_mouse_drag]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug1.'_slider_mouse_drag', array( 'label' => __( 'Mouse Drag', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_mouse_drag]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug1.'[slider_autoplay]',array( 'default' => 'false', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug1.'_slider_autoplay', array( 'label' => __( 'Autoplay', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_autoplay]', 'choices' => array('false' => 'False','true' => 'True'), ) ) ); } $wp_customize->add_setting($section_setting_slug1.'[slider_autoplayHoverPause]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug1.'_slider_autoplayHoverPause', array( 'label' => __( 'Autoplay Hover Pause', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_autoplayHoverPause]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug1."[slider_smart_speed]",array( 'default' => '1000', 'sanitize_callback' =>'absint' , )); $wp_customize->add_control('control_'.$section_control_slug1.'_slider_smart_speed', array( 'type' => 'number', 'label' => __( 'Smart Speed', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1."[slider_smart_speed]", ) ); $wp_customize->add_setting($section_setting_slug1.'[slider_bg_color]',array( 'default'=>'#000', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug1.'_slider_bg_color', array( 'label' => __( 'Background Color', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_bg_color]', ) ) ); $wp_customize->add_setting($section_setting_slug1.'[slider_btn_show]',array( 'default' => 'yes', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug1.'_slider_btn_show', array( 'label' => __( 'Show Button', 'aztecs' ), 'section' => $customizer_section1, 'settings' => $section_setting_slug1.'[slider_btn_show]', 'choices' => array('yes' => 'Yes','no' => 'No'), ) ) ); } /* End Slider*/ /* For Feature */ $customizer_section2 = 'section_home_section_2'; $section_setting_slug2 = 'front_page_load_sections[section_2]'; $section_control_slug2 = 'home_section_2'; $wp_customize->add_section($customizer_section2, array( 'title' => __('FEATURES', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug2."[display]",array( 'default' =>'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug2.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section2, 'settings' => $section_setting_slug2."[display]", ) ); $wp_customize->add_setting($section_setting_slug2.'[features_bg_color]',array( 'default'=>'#ffffff', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug2.'features_bg_color', array( 'label' => __( 'Background Color', 'aztecs' ), 'section' => $customizer_section2, 'settings' => $section_setting_slug2.'[features_bg_color]', ) ) ); /* For About us */ $customizer_section3 = 'section_home_section_3'; $section_setting_slug3 = 'front_page_load_sections[section_3]'; $section_control_slug3 = 'home_section_3'; $wp_customize->add_section($customizer_section3, array( 'title' => __('ABOUT US', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug3."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug3.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3."[display]", ) ); $wp_customize->add_setting($section_setting_slug3."[about_tagline]",array( 'default' => 'About Us', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug3.'_about_tagline', array( 'label' => __( 'Tagline', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3."[about_tagline]", ) ); $wp_customize->add_setting($section_setting_slug3."[about_heading]",array( 'default' => 'Great Digital Agency
Since 1980', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug3.'_about_heading', array( 'label' => __( 'Heading', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3."[about_heading]", ) ); $wp_customize->add_setting($section_setting_slug3.'[about_us_image]',array( 'default' => get_template_directory_uri().'/assets/images/about/aboutus_2.jpg' , 'sanitize_callback' =>'esc_attr' , )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'control_'.$section_control_slug3.'_about_us_image', array( 'label' => __( 'About Image', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3.'[about_us_image]', ) ) ); $wp_customize->add_setting($section_setting_slug3.'[about_content]',array( 'default' => __('Creative & Proffesional Digital Agency! Duis sed tellus leo. Donec vitae neque sed felis fringilla viverra. Phasellus mollis pellentesque libero ac felis vehicula. Morbi sagittis et ornare maximus. Morbi euismod eros quis lacinia iaculis. Vivamus quis erat vel eros egestas bibendum vitae mollis sem. Vestibulum vel scelerisque turpis. Quisque ac lacinia scelerisque risus. Proin vel et dignissim risus.', 'aztecs' ), 'sanitize_callback' => 'wp_kses_post', ) ); if (class_exists( 'Aztecs_Customize_tinymce_Control')) { $wp_customize->add_control( new Aztecs_Customize_tinymce_Control($wp_customize, 'control_'.$section_control_slug3.'_content', array( 'label' => __( 'Content', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3.'[about_content]', ) ) ); } $wp_customize->add_setting($section_setting_slug3.'[about_btn_show]',array( 'default' => 'yes', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug3.'_about_btn_show', array( 'label' => __( 'Show Button', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3.'[about_btn_show]', 'choices' => array('yes' => 'Yes','no' => 'No'), ) ) ); } $wp_customize->add_setting($section_setting_slug3.'[about_btn_text]',array( 'default' => 'Read More', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( 'control_'.$section_control_slug3.'_about_btn_text', array( 'label' => __( 'Button Text', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3.'[about_btn_text]', ) ); $wp_customize->add_setting($section_setting_slug3.'[about_btn_link]',array( 'default' => '#.', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'control_'.$section_control_slug3.'_about_btn_link', array( 'label' => __( 'Button Link', 'aztecs' ), 'section' => $customizer_section3, 'settings' => $section_setting_slug3.'[about_btn_link]', ) ); /* For counter */ $customizer_section4 = 'section_home_section_4'; $section_setting_slug4 = 'front_page_load_sections[section_4]'; $section_control_slug4 = 'home_section_4'; $wp_customize->add_section($customizer_section4, array( 'title' => __('COUNTER', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug4."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug4.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4."[display]", ) ); $wp_customize->add_setting($section_setting_slug4.'[counter_bg_color]',array( 'default'=>'rgba(255, 255, 255, 0)', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug4.'counter_text_color', array( 'label' => __( 'Background Color', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter_bg_color]', ) ) ); $wp_customize->add_setting($section_setting_slug4.'[counter_show]',array( 'default' => 'no', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug4.'_services_btn_show', array( 'label' => __( 'Show Counter', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter_show]', 'choices' => array('no' => 'No','yes' => 'Yes'), ) ) ); } $wp_customize->add_setting($section_setting_slug4.'[counter_bg_image]',array( 'default' => get_template_directory_uri().'/assets/images/bg/bg_counter_2.jpg' , 'sanitize_callback' =>'esc_attr' , )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'control_'.$section_control_slug4.'_counter_bg_image', array( 'label' => __( 'Background Image', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter_bg_image]', ) ) ); $wp_customize->add_setting($section_setting_slug4.'[counter_text_color]',array( 'default'=>'#5f6e7b', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug4.'counter_text_color', array( 'label' => __( 'Text Color', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter_text_color]', ) ) ); $wp_customize->add_setting($section_setting_slug4.'[counter_box_bg_color]',array( 'default'=>'#fff', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug4.'_counter_box_bg_color', array( 'label' => __( 'Box Background Color', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter_box_bg_color]', ) ) ); $wp_customize->add_setting($section_setting_slug4.'[counter1_image]',array( 'default' => get_template_directory_uri().'/assets/images/cta/smiley.png' , 'sanitize_callback' =>'esc_attr' , )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'control_'.$section_control_slug4.'_counter1_image', array( 'label' => __( 'Counter1 Image', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter1_image]', ) ) ); $wp_customize->add_setting($section_setting_slug4."[counter1_count]",array( 'default' => '869', 'sanitize_callback' =>'absint' , )); $wp_customize->add_control('control_'.$section_control_slug4.'_counter1_count', array( 'type' => 'number', 'label' => __( 'Counter1 Count', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4."[counter1_count]", ) ); $wp_customize->add_setting($section_setting_slug4.'[counter1_content]',array( 'default' => 'Satisfied', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( 'control_'.$section_control_slug4.'_counter1_content', array( 'label' => __( 'Counter1 Content', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter1_content]', ) ); $wp_customize->add_setting($section_setting_slug4.'[counter2_image]',array( 'default' => get_template_directory_uri().'/assets/images/cta/appointment_2.png' , 'sanitize_callback' =>'esc_attr' , )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'control_'.$section_control_slug4.'_counter2_image', array( 'label' => __( 'Counter2 Image', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter2_image]', ) ) ); $wp_customize->add_setting($section_setting_slug4."[counter2_count]",array( 'default' => '1620', 'sanitize_callback' =>'absint' , )); $wp_customize->add_control('control_'.$section_control_slug4.'_counter2_count', array( 'type' => 'number', 'label' => __( 'Counter2 Count', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4."[counter2_count]", ) ); $wp_customize->add_setting($section_setting_slug4.'[counter2_content]',array( 'default' => 'Worked', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( 'control_'.$section_control_slug4.'_counter2_content', array( 'label' => __( 'Counter2 Content', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter2_content]', ) ); $wp_customize->add_setting($section_setting_slug4.'[counter3_image]',array( 'default' => get_template_directory_uri().'/assets/images/cta/coffee_cup_2.png' , 'sanitize_callback' =>'esc_attr' , )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'control_'.$section_control_slug4.'_counter3_image', array( 'label' => __( 'Counter3 Image', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter3_image]', ) ) ); $wp_customize->add_setting($section_setting_slug4."[counter3_count]",array( 'default' => '600', 'sanitize_callback' =>'absint' , )); $wp_customize->add_control('control_'.$section_control_slug4.'_counter3_count', array( 'type' => 'number', 'label' => __( 'Counter3 Count', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4."[counter3_count]", ) ); $wp_customize->add_setting($section_setting_slug4.'[counter3_content]',array( 'default' => 'Coffee Cup', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( 'control_'.$section_control_slug4.'_counter3_content', array( 'label' => __( 'Counter3 Content', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter3_content]', ) ); $wp_customize->add_setting($section_setting_slug4.'[counter4_image]',array( 'default' => get_template_directory_uri().'/assets/images/cta/list_2.png' , 'sanitize_callback' =>'esc_attr' , )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'control_'.$section_control_slug4.'_counter4_image', array( 'label' => __( 'Counter4 Image', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter4_image]', ) ) ); $wp_customize->add_setting($section_setting_slug4."[counter4_count]",array( 'default' => '128', 'sanitize_callback' =>'absint' , )); $wp_customize->add_control('control_'.$section_control_slug4.'_counter4_count', array( 'type' => 'number', 'label' => __( 'Counter4 Count', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4."[counter4_count]", ) ); $wp_customize->add_setting($section_setting_slug4.'[counter4_content]',array( 'default' => 'Project', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( 'control_'.$section_control_slug4.'_counter4_content', array( 'label' => __( 'Counter4 Content', 'aztecs' ), 'section' => $customizer_section4, 'settings' => $section_setting_slug4.'[counter4_content]', ) ); /* End For Counter */ /* For Services */ $customizer_section5 = 'section_home_section_5'; $section_setting_slug5 = 'front_page_load_sections[section_5]'; $section_control_slug5 = 'home_section_5'; $wp_customize->add_section($customizer_section5, array( 'title' => __('SERVICES', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug5."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug5.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section5, 'settings' => $section_setting_slug5."[display]", ) ); $wp_customize->add_setting($section_setting_slug5."[services_tagline]",array( 'default' => 'Services', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug5.'_services_tagline', array( 'label' => __( 'Tagline', 'aztecs' ), 'section' => $customizer_section5, 'settings' => $section_setting_slug5."[services_tagline]", ) ); $wp_customize->add_setting($section_setting_slug5."[services_heading]",array( 'default' => 'See Our Workflow Process', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug5.'_services_heading', array( 'label' => __( 'Heading', 'aztecs' ), 'section' => $customizer_section5, 'settings' => $section_setting_slug5."[services_heading]", ) ); $wp_customize->add_setting($section_setting_slug5.'[services_content]',array( 'default' => 'Nullam congue felis quis lectus tincidunt molestie. Etiam pulvinar mattis odio ac ullamcorper. Ut egestas metus arcu, id consequat tortor accumsan vitae. Fusce tempor, nunc ac volutpat consectetur. Cras euismod posuere. Etiam convallis quis vehicula posuere. risus tellus, consectetur a vulputate ut, eleifend ac nibh.', 'sanitize_callback' => 'wp_kses_post', ) ); if (class_exists( 'Aztecs_Customize_tinymce_Control')) { $wp_customize->add_control( new Aztecs_Customize_tinymce_Control($wp_customize, 'control_'.$section_control_slug5.'_content', array( 'label' => __( 'Content', 'aztecs' ), 'section' => $customizer_section5, 'settings' => $section_setting_slug5.'[services_content]', ) ) ); } $wp_customize->add_setting($section_setting_slug5.'[services_btn_show]',array( 'default' => 'yes', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug5.'_services_btn_show', array( 'label' => __( 'Show Button', 'aztecs' ), 'section' => $customizer_section5, 'settings' => $section_setting_slug5.'[services_btn_show]', 'choices' => array('yes' => 'Yes','no' => 'No'), ) ) ); } $wp_customize->add_setting($section_setting_slug5.'[services_btn_text]',array( 'default' => 'Read More', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( 'control_'.$section_control_slug5.'_services_btn_text', array( 'label' => __( 'Button Text', 'aztecs' ), 'section' => $customizer_section5, 'settings' => $section_setting_slug5.'[services_btn_text]', ) ); $wp_customize->add_setting($section_setting_slug5.'[services_btn_link]',array( 'default' => '#.', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'control_'.$section_control_slug5.'_services_btn_link', array( 'label' => __( 'Button Link', 'aztecs' ), 'section' => $customizer_section5, 'settings' => $section_setting_slug5.'[services_btn_link]', ) ); /* For team */ $customizer_section6 = 'section_home_section_6'; $section_setting_slug6 = 'front_page_load_sections[section_6]'; $section_control_slug6 = 'home_section_6'; $wp_customize->add_section($customizer_section6, array( 'title' => __('OUR TEAM', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug6."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug6.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6."[display]", ) ); $wp_customize->add_setting($section_setting_slug6."[team_tagline]",array( 'default' => 'Our Team', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug6.'_team_tagline', array( 'label' => __( 'Tagline', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6."[team_tagline]", ) ); $wp_customize->add_setting($section_setting_slug6."[team_heading]",array( 'default' => 'Our Top Expertise', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug6.'_team_heading', array( 'label' => __( 'Heading', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6."[team_heading]", ) ); $wp_customize->add_setting($section_setting_slug6.'[team_show_type]',array( 'default' => 'slide', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_show_type', array( 'label' => __( 'Show Type', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_show_type]', 'choices' => array("grid" => "Grid", "slide" => "Slide", ), ) ) );} $wp_customize->add_setting($section_setting_slug6.'[team_no_of_record]',array( 'default' => '3', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_no_of_record', array( 'label' => __( 'Number of Records', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_no_of_record]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6" ), ) ) );} $wp_customize->add_setting($section_setting_slug6.'[team_no_of_items]',array( 'default' => '4', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_no_of_items', array( 'label' => __( 'Slide To Show', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_no_of_items]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4" ), ) ) );} $wp_customize->add_setting($section_setting_slug6.'[team_autoplay]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_autoplay', array( 'label' => __( 'Autoplay', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_autoplay]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug6.'[team_autoplaySpeed]',array( 'default' => '1000', 'sanitize_callback' =>'absint' , )); $wp_customize->add_control('control_'.$section_control_slug6.'_team_autoplaySpeed', array( 'type' => 'number', 'label' => __( 'Autoplay Speed', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6."[team_autoplaySpeed]", ) ); $wp_customize->add_setting($section_setting_slug6.'[team_dots]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_dots', array( 'label' => __( 'Dots', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_dots]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug6.'[team_draggable]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_draggable', array( 'label' => __( 'Draggable', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_draggable]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug6.'[team_infinite]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_infinite', array( 'label' => __( 'Infinite', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_infinite]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug6.'[team_tablet]',array( 'default' => '3', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_tablet', array( 'label' => __( 'Tablet', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_tablet]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4" ), ) ) );} $wp_customize->add_setting($section_setting_slug6.'[team_mobile]',array( 'default' => '2', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_mobile', array( 'label' => __( 'Mobile', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_mobile]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4" ), ) ) );} $wp_customize->add_setting($section_setting_slug6.'[team_small_device]',array( 'default' => '1', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug6.'_team_small_device', array( 'label' => __( 'Small Device', 'aztecs' ), 'section' => $customizer_section6, 'settings' => $section_setting_slug6.'[team_small_device]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4" ), ) ) );} /* Testimonials */ $customizer_section7 = 'section_home_section_7'; $section_setting_slug7 = 'front_page_load_sections[section_7]'; $section_control_slug7 = 'home_section_7'; $wp_customize->add_section($customizer_section7, array( 'title' => __('TESTIMONIAL', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug7."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug7.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7."[display]", ) ); $wp_customize->add_setting($section_setting_slug7."[testimonial_heading]",array( 'default' => 'Our Client Feedback', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug7.'_testimonial_heading', array( 'label' => __( 'Heading', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7."[testimonial_heading]", ) ); $wp_customize->add_setting($section_setting_slug7.'[testimonial_no_of_record]',array( 'default' => '3', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug7.'_testimonial_no_of_record', array( 'label' => __( 'Number of Records', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7.'[testimonial_no_of_record]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6" ), ) ) ); } $wp_customize->add_setting($section_setting_slug7.'[testimonial_nav]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug7.'_testimonial_nav', array( 'label' => __( 'Navigation', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7.'[testimonial_nav]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug7.'[testimonial_autoplay]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug7.'_testimonial_autoplay', array( 'label' => __( 'Autoplay', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7.'[testimonial_autoplay]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug7.'[testimonial_autoplaySpeed]',array( 'default' => '500', 'sanitize_callback' =>'absint' , )); $wp_customize->add_control('control_'.$section_control_slug7.'_testimonial_autoplaySpeed', array( 'type' => 'number', 'label' => __( 'Autoplay Speed', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7."[testimonial_autoplaySpeed]", ) ); $wp_customize->add_setting($section_setting_slug7.'[testimonial_draggable]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug7.'_testimonial_draggable', array( 'label' => __( 'Draggable', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7.'[testimonial_draggable]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug7.'[testimonial_infinite]',array( 'default' => 'true', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control( new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug7.'_testimonial_infinite', array( 'label' => __( 'Infinite', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7.'[testimonial_infinite]', 'choices' => array('true' => 'True','false' => 'False'), ) ) ); } $wp_customize->add_setting($section_setting_slug7."[testimonial_blockquote_icon]",array( 'default' => 'fas fa-quote-right', 'sanitize_callback' => 'sanitize_text_field', )); if (class_exists( 'Aztecs_Customize_Icons_Control')) { $wp_customize->add_control( new Aztecs_Customize_Icons_Control( $wp_customize, 'control_'.$section_control_slug7.'_testimonial_blockquote_icon', array( 'type' => 'font_icon', 'label' => __( 'Quote Icon', 'aztecs' ), 'section' => $customizer_section7, 'settings' => $section_setting_slug7."[testimonial_blockquote_icon]", ) ) ); } /* Pricing plans*/ $customizer_section8 = 'section_home_section_8'; $section_setting_slug8 = 'front_page_load_sections[section_8]'; $section_control_slug8 = 'home_section_8'; $wp_customize->add_section($customizer_section8, array( 'title' => __('PRICE', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug8."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug8.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8."[display]", ) ); $wp_customize->add_setting($section_setting_slug8."[pricing_tagline]",array( 'default' => 'Pricing Table', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug8.'_pricing_tagline', array( 'label' => __( 'Tagline', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8."[pricing_tagline]", ) ); $wp_customize->add_setting($section_setting_slug8."[pricing_heading]",array( 'default' => 'Our Pricing Plan', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug8.'_pricing_heading', array( 'label' => __( 'Heading', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8."[pricing_heading]", ) ); $wp_customize->add_setting($section_setting_slug8.'[pricing_no_of_record]',array( 'default' => '3', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug8.'_pricing_no_of_record', array( 'label' => __( 'Number of Records', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8.'[pricing_no_of_record]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6" ), ) ) );} $wp_customize->add_setting($section_setting_slug8.'[pricing_no_of_column]',array( 'default' => '3', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug8.'_pricing_no_of_column', array( 'label' => __( 'No of Columns', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8.'[pricing_no_of_column]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4" ), ) ) );} $wp_customize->add_setting($section_setting_slug8.'[pricing_box_btn_bg_hover_color]',array( 'default' => '#fff', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug8.'_pricing_box_btn_bg_hover_color', array( 'label' => __( 'Content Hover Color', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8.'[pricing_box_btn_bg_hover_color]', ) ) ); $wp_customize->add_setting($section_setting_slug8.'[pricing_box_btn_bg_hover_color]',array( 'default' => '#fff', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug8.'_pricing_box_btn_bg_hover_color', array( 'label' => __( 'Button Background Hover Color', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8.'[pricing_box_btn_bg_hover_color]', ) ) ); $wp_customize->add_setting($section_setting_slug8.'[pricing_box_btn_hover_color]',array( 'default' => '#00d9a6', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug8.'_pricing_box_btn_hover_color', array( 'label' => __( 'Button Hover Color', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8.'[pricing_box_btn_hover_color]', ) ) ); $wp_customize->add_setting($section_setting_slug8.'[pricing_box_btn_border_hover_color]',array( 'default' => '#fff', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug8.'_pricing_box_btn_border_hover_color', array( 'label' => __( 'Button Border Hover Color', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8.'[pricing_box_btn_border_hover_color]', ) ) ); $wp_customize->add_setting($section_setting_slug8."[pricing_button_title]",array( 'default' => 'SIGN UP NOW', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control('control_'.$section_control_slug8.'_pricing_button_title', array( 'label' => __( 'Button Title', 'aztecs' ), 'section' => $customizer_section8, 'settings' => $section_setting_slug8."[pricing_button_title]", ) ); /* For News/Blog */ $customizer_section9 = 'section_home_section_9'; $section_setting_slug9 = 'front_page_load_sections[section_9]'; $section_control_slug9 = 'home_section_9'; $wp_customize->add_section($customizer_section9, array( 'title' => __('NEWS/BLOG', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug9."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug9.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section9, 'settings' => $section_setting_slug9."[display]", ) ); $wp_customize->add_setting($section_setting_slug9."[news_tagline]",array( 'default' => 'News:', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug9.'_news_tagline', array( 'label' => __( 'Tagline', 'aztecs' ), 'section' => $customizer_section9, 'settings' => $section_setting_slug9."[news_tagline]", ) ); $wp_customize->add_setting($section_setting_slug9."[news_heading]",array( 'default' => 'Latest Blog', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug9.'_news_heading', array( 'label' => __( 'Heading', 'aztecs' ), 'section' => $customizer_section9, 'settings' => $section_setting_slug9."[news_heading]", ) ); $wp_customize->add_setting($section_setting_slug9."[news_link_text]",array( 'default' => 'Read More', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug9.'_news_link_text', array( 'label' => __( 'Link Text', 'aztecs' ), 'section' => $customizer_section9, 'settings' => $section_setting_slug9."[news_link_text]", ) ); $wp_customize->add_setting($section_setting_slug9.'[news_no_of_records]',array( 'default' => '3', 'sanitize_callback' =>'sanitize_text_field', )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug9.'_news_no_of_records', array( 'label' => __( 'Number of Records', 'aztecs' ), 'section' => $customizer_section9, 'settings' => $section_setting_slug9.'[news_no_of_records]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6" ), ) ) );} $wp_customize->add_setting($section_setting_slug9.'[news_no_of_items]',array( 'default' => '3', 'sanitize_callback' =>'sanitize_text_field' , )); if (class_exists( 'Aztecs_Select_Box_Control')) { $wp_customize->add_control(new Aztecs_Select_Box_Control($wp_customize, 'control_'.$section_control_slug9.'_news_no_of_items', array( 'label' => __( 'No of Columns', 'aztecs' ), 'section' => $customizer_section9, 'settings' => $section_setting_slug9.'[news_no_of_items]', 'choices' => array("1" => "1", "2" => "2", "3" => "3", "4" => "4" ), ) ) );} /* Call to Action*/ /* For News/Blog */ $customizer_section10 = 'section_home_section_10'; $section_setting_slug10 = 'front_page_load_sections[section_10]'; $section_control_slug10 = 'home_section_10'; $wp_customize->add_section($customizer_section10, array( 'title' => __('CALL TO ACTION', 'aztecs' ), 'priority' => 10, 'panel' => 'front_panel', )); $wp_customize->add_setting($section_setting_slug10."[display]",array( 'default' => 'on', 'sanitize_callback' =>'aztecs_sanitize_display_settings' , )); $wp_customize->add_control('control_'.$section_control_slug10.'_display', array( 'type' => 'checkbox', 'label' => __( 'Display', 'aztecs' ), 'section' => $customizer_section10, 'settings' => $section_setting_slug10."[display]", ) ); $wp_customize->add_setting($section_setting_slug10.'[callaction_bg_image]',array( 'default' => get_template_directory_uri().'/assets/images/bg/bg_cta.jpg', 'sanitize_callback' =>'esc_attr' , )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'control_'.$section_control_slug10.'_callaction_bg_image', array( 'label' => __( 'Background Image', 'aztecs' ), 'section' => $customizer_section10, 'settings' => $section_setting_slug10.'[callaction_bg_image]', ) ) ); $wp_customize->add_setting($section_setting_slug10."[callaction_text1]",array( 'default' => 'Do You Have Any Project?', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug10.'_callaction_text1', array( 'label' => __( 'Text 1', 'aztecs' ), 'section' => $customizer_section10, 'settings' => $section_setting_slug10."[callaction_text1]", ) ); $wp_customize->add_setting($section_setting_slug10."[callaction_text2]",array( 'default' => 'Contact Us', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug10.'_callaction_text2', array( 'label' => __( 'Text 2', 'aztecs' ), 'section' => $customizer_section10, 'settings' => $section_setting_slug10."[callaction_text2]", ) ); $wp_customize->add_setting($section_setting_slug10.'[callaction_text_color]',array( 'default' => '#fff', 'sanitize_callback' =>'sanitize_text_field' , )); $wp_customize->add_control( new Aztecs_Alpha_Color_Control( $wp_customize, 'control_'.$section_control_slug10.'_callaction_text_color', array( 'label' => __( 'Text Color', 'aztecs' ), 'section' => $customizer_section10, 'settings' => $section_setting_slug10.'[callaction_text_color]', ) ) ); $wp_customize->add_setting($section_setting_slug10."[callaction_btn_text]",array( 'default' => 'Contact Us', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug10.'_callaction_btn_text', array( 'label' => __( 'Button Text', 'aztecs' ), 'section' => $customizer_section10, 'settings' => $section_setting_slug10."[callaction_btn_text]", ) ); $wp_customize->add_setting($section_setting_slug10."[callaction_btn_link]",array( 'default' => '#.', 'sanitize_callback' =>'sanitize_text_field', )); $wp_customize->add_control('control_'.$section_control_slug10.'_callaction_btn_link', array( 'label' => __( 'Button Link', 'aztecs' ), 'section' => $customizer_section10, 'settings' => $section_setting_slug10."[callaction_btn_link]", ) ); // sanitize callback function function aztecs_sanitize_display_settings( $checked ) { return ( ( isset( $checked ) && true === $checked ) ? 'on' : false); } } function aztecs_load_homepage_sections() { global $section; $sections = aztecs_customize_theme_mod('front_page_load_sections'); if (is_array($sections)) { foreach ( $sections as $key => $section ) { $section['section_settings'] = $this->aztecs_get_section_settings($key); } } $section_cls_arr = array( 'fst_section_home_section_1','fst_section_home_section_2','fst_section_home_section_3','fst_section_home_section_4','fst_section_home_section_5','fst_section_home_section_6','fst_section_home_section_7','fst_section_home_section_8','fst_section_home_section_9','fst_section_home_section_10' ); wp_localize_script( 'fst-customizer-js', 'sections_class', $section_cls_arr ); if (!isset($sections['section_1']['display']) || $sections['section_1']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_1'; get_template_part('template-parts/homepage/home_section_1'); } if (!isset($sections['section_2']['display']) || $sections['section_2']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_2'; get_template_part('template-parts/homepage/home_section_2'); } if (!isset($sections['section_3']['display']) || $sections['section_3']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_3'; get_template_part('template-parts/homepage/home_section_3'); } if (!isset($sections['section_4']['display']) || $sections['section_4']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_4'; get_template_part('template-parts/homepage/home_section_4'); } if (!isset($sections['section_5']['display']) || $sections['section_5']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_5'; get_template_part('template-parts/homepage/home_section_5'); } if (!isset($sections['section_6']['display']) || $sections['section_6']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_6'; get_template_part('template-parts/homepage/home_section_6'); } if (!isset($sections['section_7']['display']) || $sections['section_7']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_7'; get_template_part('template-parts/homepage/home_section_7'); } if (!isset($sections['section_8']['display']) || $sections['section_8']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_8'; get_template_part('template-parts/homepage/home_section_8'); } if (!isset($sections['section_9']['display']) || $sections['section_9']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_9'; get_template_part('template-parts/homepage/home_section_9'); } if (!isset($sections['section_10']['display']) || $sections['section_10']['display'] == 'on') { $section['html_class'] = 'fst_section_home_section_10'; get_template_part('template-parts/homepage/home_section_10'); } } function aztecs_xml_import_process($file,$type) { $wpImport = new AZTECS_WP_Import_new(); if ($type=='post') { return $wpImport->import( $file ); } } function aztecs_default_section_content() { $is_demo_import = get_option('fst_demo_import_flag', false); if ($is_demo_import) { return false; exit; } $file_name = AZTECS_DEMOIMPORTER_PATH.AZTECS_DEMOIMPORTER_FILE; ignore_user_abort(true); set_time_limit(0); $postresult = $this->aztecs_xml_import_process( $file_name, 'post'); if (is_array ($postresult) && $postresult['result_status'] == 'success') { update_option('fst_demo_import_flag',true); } print_r(json_encode($postresult)); die(); } function aztecs_get_section_settings($handle) { $settings = ""; if (function_exists('aztecs_customize_theme_mod')) { $settings = aztecs_customize_theme_mod('front_page_load_sections'); } if (isset($settings[$handle])) { return $settings[$handle]; } return false; } public static function aztecs_load_page_gutenberg_sections($page = 'front_page') { global $post; $sections = array(); $front_page_settings = ""; if (function_exists('aztecs_customize_theme_mod')) { $front_page_settings = aztecs_customize_theme_mod($page.'_load_sections'); } $sections=apply_filters('aztecs_register_home_page_sections', $front_page_settings, 'block'); return $sections; } function aztecs_export_theme_settings() { ob_start(); if (isset($_GET['export']) && $_GET['page'] == 'demo-fudutheme') { $template = get_template(); $mods = get_theme_mods(); $data = $mods ? $mods : array(); $export_slug='fudutheme'; header('Content-Type: application/json'); header('Content-Disposition: attachment; filename="' . $export_slug . '.json"'); echo json_encode($data, JSON_PRETTY_PRINT); die(); } $output_string = ob_get_contents(); ob_end_clean(); return $output_string; } // demo import section // function aztecs_appearnace_menu() { add_theme_page('Demo Fudu theme', 'Fudu theme', 'import', 'demo-fudutheme', array($this, 'aztecs_import_demo_sections')); } function aztecs_import_demo_sections() { if (isset($_GET['import']) && $_GET['page'] == 'demo-fudutheme') { if (!empty($_FILES)) { WP_Filesystem(); global $wp_filesystem; $file_content = $wp_filesystem->get_contents($_FILES['import_file']['tmp_name']); $decode_content = json_decode($file_content, true); $decode_content_arr = (array) $decode_content; $update = update_option( 'theme_mods_freefudutheme', $decode_content_arr, '', 'yes' ); global $msg; $msg = 'Settings imported Successfully.'; } } get_template_part('fst-framework/admin-template-parts/content/import_data_content'); } /** * Register the required plugins for this theme. */ function aztecs_theme_register_required_plugins() { /* * Array of plugin arrays. Required keys are name and slug. * If the source is NOT from the .org repo, then source is also required. */ $plugins = array( array( 'name' => __('Contact Form 7', 'aztecs' ), 'slug' => 'contact-form-7', 'required' => false, ), array( 'name' => __('MC4WP: Mailchimp for WordPress', 'aztecs' ), 'slug' => 'mailchimp-for-wp', 'required' => false, ), array( 'name' => __('Fudu Aztecs Library', 'aztecs' ), 'slug' => 'fudu-aztecs-library', 'source' => 'https://www.fuduthemes.com/support-plugins/fudutheme-aztecs/fudu-aztecs-library-1.0.0.zip', 'required' => true, // this plugin is required 'external_url' => 'https://www.fuduthemes.com/', // page of my plugin 'force_deactivation' => true, // deactivate this plugin when the user switches to another theme ) ); /* * Array of configuration settings. Amend each line as needed. * * Only uncomment the strings in the config array if you want to customize the strings. */ $config = array( 'id' => 'tgmpa',// Unique ID for hashing notices for multiple instances. 'default_path' => '', // Default absolute path to bundled plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'parent_slug' => 'themes.php', // Parent menu slug. 'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used. 'has_notices' => true,// Show admin notices or not. 'dismissable' => true,// If false, a user cannot dismiss the nag message. 'dismiss_msg' => true,// If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => true,// Automatically activate plugins after installation or not. 'message' => '',// Message to output right before the plugins table. ); tgmpa( $plugins, $config ); } public static function aztecs_get_taxonomy($category) { $tabpanel_category = get_terms( $category, array( 'hide_empty' => false, ) ); $tabpanel_choices = array(); if (count($tabpanel_category)>0) { foreach ($tabpanel_category as $key => $categories) { $tabpanel_choices[$categories->term_id] = $categories->name; } } return $tabpanel_choices; } public static function aztecs_get_section_default_values($sections) { $defaultValues = array(); if (is_array($sections) && !empty($sections)) { foreach ($sections as $handle => $section) { $defaultValues = array_map(function($setting) { if (isset($setting['default']) && !empty($setting['default'])) { if (strpos($setting['default'], '{{stylesheet_path}}') !== false) { $setting['default'] = str_replace('{{stylesheet_path}}', get_template_directory_uri(), $setting['default']); } if (strpos($setting['default'], '{{template_path}}') !== false) { $setting['default'] = str_replace('{{template_path}}', get_template_directory_uri(), $setting['default']); } } return $setting['default']; }, $section["settings"]); $defaultValues['slug'] = $section['slug']; } } return $defaultValues; } public static function aztecs_filter_xML($matches) { return $matches[1] . preg_replace('/[^a-z]/ui', '_', $matches[2]) . $matches[3]; } } new AztecsFramework();