add_panel( 'basic_panel', array( 'priority' => 1, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'General', 'aztecs' ), ) ); $wp_customize->add_panel( 'typography_panel', array( 'priority' => 2, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Typography', 'aztecs' ), ) ); $wp_customize->add_panel( 'color_panel', array( 'priority' => 3, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Colors', 'aztecs' ), ) ); $wp_customize->add_panel( 'front_panel', array( 'priority' => 4, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Front Page', 'aztecs' ), ) ); $wp_customize->add_panel( 'header_panel', array( 'priority' => 5, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Header Setting', 'aztecs' ), ) ); $wp_customize->add_panel( 'footer_panel', array( 'priority' => 6, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Footer Setting', 'aztecs' ), ) ); $wp_customize->add_panel( 'post_page_panel', array( 'priority' => 7, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Posts', 'aztecs' ), ) ); $wp_customize->add_panel( 'import_export_panel', array( 'priority' => 8, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Export/Import', 'aztecs' ), ) ); $wp_customize->get_section( 'title_tagline' )->panel = 'header_panel'; $wp_customize->get_section( 'title_tagline' )->title = __( 'Site Settings', 'aztecs' ); if ($wp_customize->get_section( 'static_front_page' )) { $wp_customize->get_section( 'static_front_page' )->panel = 'basic_panel'; } if ($wp_customize->get_section( 'color' )) { $wp_customize->get_section( 'color' )->panel = 'basic_panel'; } if ($wp_customize->get_section( 'custom_css' )) { $wp_customize->get_section( 'custom_css' )->panel = 'basic_panel'; $wp_customize->get_section( 'custom_css' )->title = __( 'Additional CSS', 'aztecs' ); } $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => 'a.fs-logo .blogname', 'render_callback' => 'fudutheme_customize_partial_blogname', ) ); $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => 'a.fs-logo .blog-description', 'render_callback' => 'fudutheme_customize_partial_blogname', ) ); $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_setting( 'background_color' )->transport = 'postMessage'; /* include default section options files */ require AZTECS_DIR.'/fst-framework/fst-customizer/fst-sections/fst-basic-section.php'; require AZTECS_DIR.'/fst-framework/fst-customizer/fst-sections/fst-header-section.php'; require AZTECS_DIR.'/fst-framework/fst-customizer/fst-sections/fst-footer-section.php'; require AZTECS_DIR.'/fst-framework/fst-customizer/fst-sections/fst-menu-section.php'; require AZTECS_DIR.'/fst-framework/fst-customizer/fst-sections/fst-theme-site-section.php'; } /** * FuduTheme customizer style layout script enqueue * @package FuduTheme_Freamwork * @author FuduTheme Team */ public static function aztecs_enqueue_customizer_style() { wp_enqueue_style( 'font-awesome-min-css', 'https://use.fontawesome.com/releases/v5.8.1/css/all.css', $deps = array(), THEME_VERSION ); wp_enqueue_style( 'fudutheme_option_css', AZTECS_URI . '/fst-framework/fst-customizer/assets/css/theme-options.css', $deps = array(), THEME_VERSION ); wp_register_script( 'fst-customizer-js', AZTECS_URI . '/fst-framework/fst-customizer/assets/js/fst-customizer.js', array(), '1.0.1', 'all'); wp_enqueue_script('fst-customizer-js'); wp_enqueue_script( 'fst-custom-js', get_template_directory_uri() . '/fst-framework/fst-customizer/assets/js/fst-custom.js', array(), '1.1', 'all'); wp_enqueue_script('alpha-color-picker-js',get_template_directory_uri() . '/fst-framework/fst-customizer/assets/js/alpha-color-picker.js',array( 'jquery', 'wp-color-picker' ),'1.0.0',true); wp_enqueue_style('alpha-color-picker-css',get_template_directory_uri() . '/fst-framework/fst-customizer/assets/css/alpha-color-picker.css',array( 'wp-color-picker' ),'1.0.0'); /* Get post page */ $post_page_id = get_option( 'page_for_posts',''); $slug = ($post_page_id) ? get_post_field( 'post_name', $post_page_id ) : '' ; wp_localize_script( 'fst-customizer-js', 'fuduthemeL10n', array( 'sliderlink' => sprintf(__( ' Click Here To Manage Sliders', 'aztecs' ),esc_url( home_url( '/' ))), 'home_url' => esc_url( home_url( '/' )), 'featurelink' => sprintf(__( ' Click Here To Manage Features', 'aztecs' ),esc_url( home_url( '/' ))), 'serviceslink' => sprintf( __( ' Click Here To Manage Services', 'aztecs' ),esc_url( home_url( '/' ))), 'ourteamlink' => sprintf(__( ' Click Here To Manage Our Team', 'aztecs' ),esc_url( home_url( '/' ))), 'testimoniallink' => sprintf(__( 'Click Here To Manage Testimonials', 'aztecs' ),esc_url( home_url( '/' ))), 'pricinglink' => sprintf(__( 'Click Here To Manage Pricing Plans', 'aztecs' ),esc_url( home_url( '/' ))), 'bloglink' => sprintf(__( ' Click Here To Manage News/Posts', 'aztecs' ),esc_url( home_url( '/' ))), ) ); } /** * This will output the custom WordPress settings to the live theme's WP head. * * Used by hook: 'wp_head' * * @see add_action('wp_head',$func) * @package FuduTheme_Freamwork * @author FuduTheme Team */ public static function aztecs_customizer_live_preview() { wp_enqueue_script( 'fst-customizer-js', AZTECS_URI . '/fst-framework/fst-customizer/assets/js/fst-customizer-preview.js', array(), '1.0.1', 'all'); $top_bar_sticky = get_theme_mod('top_bar_sticky_setting',"yes"); wp_localize_script( 'fst-customizer-js', 'top_bar_sticky', $top_bar_sticky ); } public static function aztecs_customizer_css() { require AZTECS_DIR.'/fst-framework/fst-customizer/fst-customizer-css.php' ; } public static function aztecs_widgets_init() { $footer_column_setting = get_theme_mod('footer_column_setting',4); if($footer_column_setting){ for ($i=1; $i <= $footer_column_setting; $i++) { register_sidebar( array( 'name' => sprintf(__( ' Footer %s', 'aztecs'), $i), 'id' => 'aztecs_sidebar_'.$i, 'before_widget' => '