get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial('blogname', array( 'selector' => '.main-header__logo', 'container_inclusive' => false, 'render_callback' => function() { get_template_part( 'template/header/logo' ); }, )); $wp_customize->selective_refresh->add_partial( 'anila_footer_partial', array( 'settings' => array( 'anila_site_info', 'anila_footer_existence', 'anila_footer_now', 'anila_footer_background', ), 'selector' => '.default-footer', 'container_inclusive' => true, 'render_callback' => function() { get_template_part( 'template/footer/footer-credit' ); }, )); // All Footer Options $wp_customize->add_section( 'anila-_footer_options', array( 'title' => esc_html__( 'Footer Options', 'anila' ), 'description' => esc_html__( 'Change footer options as per your choice', 'anila' ), 'priority' => 26, )); $wp_customize->add_setting('anila_site_info', array( 'default' => 'All right reserved.', 'sanitize_callback' => 'anila_sanitize_site_info', 'transport' => 'postMessage', )); $wp_customize->add_control( 'anila_site_info', array( 'type' => 'text', 'label' => esc_html__( 'Footer site Info', 'anila' ), 'section' => 'anila-_footer_options', )); $wp_customize->add_setting( 'anila_footer_existence', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', 'transport' => 'postMessage', )); $wp_customize->add_control( 'anila_footer_existence', array( 'type' => 'select', 'label' => esc_html__( 'Do you want footer widget area?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila-_footer_options', )); $wp_customize->add_setting( 'anila_footer_now', array( 'default' => esc_html__( '4', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', 'transport' => 'postMessage', )); $wp_customize->add_control( 'anila_footer_now', array( 'type' => 'select', 'label' => esc_html__( 'How many widget do you want?', 'anila' ), 'choices' => array( '1' => esc_html__( '1 (Only Pro)', 'anila' ), '2' => esc_html__( '2 (Only Pro)', 'anila' ), '3' => esc_html__( '3 (Only Pro)', 'anila' ), '4' => esc_html__( '4', 'anila' ), ), 'section' => 'anila-_footer_options', )); $wp_customize->add_setting( 'anila_footer_background', array( 'default' => esc_html__( 'dark', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', 'transport' => 'postMessage', )); $wp_customize->add_control( 'anila_footer_background', array( 'type' => 'select', 'label' => esc_html__( 'Footer background Dark or Light?', 'anila' ), 'choices' => array( 'dark' => esc_html__( 'Dark', 'anila' ), 'light' => esc_html__( 'Light(Only Pro)', 'anila' ), ), 'section' => 'anila-_footer_options', )); // All Layout Setting $wp_customize->add_section( 'anila_layout-option', array( 'title' => esc_html__( 'Layout', 'anila' ), 'description' => esc_html__( 'Change Home page and archive page layout', 'anila' ), 'priority' => 21, )); $wp_customize->add_setting( 'anila_home-page', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_home-page', array( 'type' => 'select', 'label' => esc_html__( 'Home Page', 'anila' ), 'choices' => array( 'Default' => esc_html__( 'Default', 'anila' ), 'home-page-2' => esc_html__( 'home-page-2(Only Pro)', 'anila' ), 'home-page-3' => esc_html__( 'home-page-3(Only Pro)', 'anila' ), 'home-page-4' => esc_html__( 'home-page-4(Only Pro)', 'anila' ), ), 'section' => 'anila_layout-option', )); $wp_customize->add_setting(' anila_archive-page', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_archive-page', array( 'type' => 'select', 'label' => esc_html__( 'Archive Page', 'anila' ), 'choices' => array( 'Default' => esc_html__( 'Default', 'anila' ), 'archive-page-2' => esc_html__( 'archive-page-2(Only Pro)', 'anila' ), 'archive-page-3' => esc_html__( 'archive-page-3(Only Pro)', 'anila' ), ), 'section' => 'anila_layout-option', )); // All header Setting $wp_customize->add_section( 'title_tagline', array( 'title' => esc_html__( 'Header options', 'anila' ), 'priority' => 20, )); $wp_customize->add_setting( 'anila_header', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_header', array( 'type' => 'select', 'label' => esc_html__( 'Header Layout', 'anila' ), 'choices' => array( 'Default' => esc_html__( 'Default', 'anila' ), 'header-2' => esc_html__( 'header-2(Only Pro)', 'anila' ), ), 'section' => 'title_tagline', )); $wp_customize->add_setting( 'anila_top-header', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_top-header', array( 'type' => 'select', 'label' => esc_html__( 'Do you want top header?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'title_tagline', )); $wp_customize->add_setting( 'anila_top-social', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_top-social', array( 'type' => 'select', 'label' => esc_html__( 'Do you want social icon on top header?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No(Only Pro)', 'anila' ), ), 'section' => 'title_tagline', )); // Single post Setting $wp_customize->add_section( 'anila_single-post-option', array( 'title' => esc_html__( 'Single Post', 'anila' ), 'description' => esc_html__( 'Change single post options', 'anila' ), 'priority' => 22, )); $wp_customize->add_setting( 'anila_single-post', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_single-post', array( 'type' => 'select', 'label' => esc_html__( 'Single Post Layout', 'anila' ), 'choices' => array( 'Default' => esc_html__( 'Default', 'anila' ), 'single-post-2' => esc_html__( 'single-post-2(Only Pro)', 'anila' ), ), 'section' => 'anila_single-post-option', )); $wp_customize->add_setting( 'anila_single-thumbnail', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_single-thumbnail', array( 'type' => 'select', 'label' => esc_html__( 'Do you want featured image on single post?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_single-post-option', )); $wp_customize->add_setting( 'anila_single-author', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_single-author', array( 'type' => 'select', 'label' => esc_html__( 'Do you want Author Info on single post?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_single-post-option', )); $wp_customize->add_setting( 'anila_single-tag', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_single-tag', array( 'type' => 'select', 'label' => esc_html__( 'Do you want to show Tags on single post?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_single-post-option', )); $wp_customize->add_setting( 'anila_single-relatedpost', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_single-relatedpost', array( 'type' => 'select', 'label' => esc_html__( 'Do you want to show related posts on single post?', 'anila' ), 'choices' => array( true => esc_html( 'Yes', 'anila' ), false => esc_html( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_single-post-option', )); $wp_customize->add_setting( 'anila_single-nextpre', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_single-nextpre', array( 'type' => 'select', 'label' => esc_html__( 'Do you want to show Next and Prev on single post?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_single-post-option', )); // Styling $wp_customize->add_section( 'anila_stylying', array( 'title' => esc_html__( 'Styling and Coloring', 'anila' ), 'description' => esc_html( 'You can change color options from here.', 'anila' ), 'priority' => 25, )); $wp_customize->add_setting( 'anila_primary_color', array( 'default' => '#3fb0ac', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'anila_primary_color', array( 'label' => esc_html__( 'Primary Color', 'anila' ), 'section' => 'anila_stylying', ))); $wp_customize->add_setting( 'anila_primary-color-light', array( 'default' => '#ceedec', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'anila_primary-color-light', array( 'label' => esc_html__( 'Primary Color light 40%', 'anila' ), 'section' => 'anila_stylying', ))); $wp_customize->add_setting( 'anila_primary-color-dark', array( 'default' => '#173e43', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'anila_primary-color-dark', array( 'label' => esc_html__( 'Primary Color Dark', 'anila' ), 'section' => 'anila_stylying', ))); $wp_customize->add_setting( 'anila_font-color', array( 'default' => '#2b2b2b', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'anila_font-color', array( 'label' => esc_html__( 'Font color', 'anila' ), 'section' => 'anila_stylying', ))); // Typography Setting $wp_customize->add_section( 'anila_Typography', array( 'title' => esc_html__( 'Typography', 'anila' ), 'description' => esc_html__( 'Change Typography options', 'anila' ), 'priority' => 23, )); $wp_customize->add_setting( 'anila_Typography_heading', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_Typography_heading', array( 'type' => 'select', 'label' => esc_html__( 'Heading Font', 'anila' ), 'choices' => array( 'Default' => esc_html__( 'Default', 'anila' ), 'Josefin Sans' => esc_html__( 'Josefin Sans (Only Pro)', 'anila' ), 'Arvo' => esc_html__( 'Arvo (Only Pro)', 'anila' ), 'Raleway' => esc_html__( 'Raleway (Only Pro)', 'anila' ), 'Catamaran' => esc_html__( 'Catamaran (Only Pro)', 'anila' ), 'PT Sans' => esc_html__( 'PT Sans (Only Pro)', 'anila' ), 'Open Sans' => esc_html__( 'Open Sans (Only Pro)', 'anila' ), 'Roboto' => esc_html__( 'Roboto (Only Pro)', 'anila' ), 'Ubuntu' => esc_html__( 'Ubuntu (Only Pro)', 'anila' ), 'Titillium Web' => esc_html__( 'Titillium Web (Only Pro)', 'anila' ), 'Crimson Text' => esc_html__( 'Crimson Text (Only Pro)', 'anila' ), 'Cairo' => esc_html__( 'Cairo (Only Pro)', 'anila' ), 'BioRhyme' => esc_html__( 'BioRhyme (Only Pro)', 'anila' ), 'Fjalla One' => esc_html__( 'Fjalla One (Only Pro)', 'anila' ), 'Rubik' => esc_html__( 'Rubik (Only Pro)', 'anila' ), ), 'section' => 'anila_Typography', )); $wp_customize->add_setting( 'anila_Typography_heading_weight', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_Typography_heading_weight', array( 'type' => 'select', 'label' => esc_html__( 'Heading Font Weight', 'anila' ), 'choices' => array( '600' => esc_html__( 'Default', 'anila' ), '700' => esc_html__( '700', 'anila' ), '800' => esc_html__( '800', 'anila' ), '900' => esc_html__( '900', 'anila' ), ), 'section' => 'anila_Typography', )); $wp_customize->add_setting( 'anila_Typography_paragraph', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_Typography_paragraph', array( 'type' => 'select', 'label' => esc_html__( 'Paragraph Font', 'anila' ), 'choices' => array( 'Default' => esc_html__( 'Default', 'anila' ), 'Space Mono' => esc_html__( 'Space Mono (Only Pro)', 'anila' ), 'Eczar' => esc_html__( 'Eczar (Only Pro)', 'anila' ), 'Alegreya' => esc_html__( 'Alegreya (Only Pro)', 'anila' ), 'Inknut Antiqua' => esc_html__( 'Inknut Antiqua (Only Pro)', 'anila' ), 'PlayFiar Display' => esc_html__( 'PlayFiar Display (Only Pro)', 'anila' ), 'Proza Libre' => esc_html__( 'Proza Libre (Only Pro)', 'anila' ), 'Cardo' => esc_html__( 'Cardo (Only Pro)', 'anila' ), 'Solway' => esc_html__( 'Solway (Only Pro)', 'anila' ), 'Sulphur Point' => esc_html__( 'Sulphur Point (Only Pro)', 'anila' ), 'Quicksand' => esc_html__( 'Quicksand (Only Pro)', 'anila' ), 'PT Sans Narrow' => esc_html__( 'PT Sans Narrow (Only Pro)', 'anila' ), 'Dosis' => esc_html__( 'Dosis (Only Pro)', 'anila' ), 'Cabin' => esc_html__( 'Cabin (Only Pro)', 'anila' ), 'Exo' => esc_html__( 'Exo (Only Pro)', 'anila' ), 'Prompt' => esc_html__( 'Prompt (Only Pro)', 'anila' ), 'Cinzel' => esc_html__( 'Cinzel (Only Pro)', 'anila' ), ), 'section' => 'anila_Typography', )); $wp_customize->add_setting( 'anila_Typography_paragraph_weight', array( 'default' => esc_html__( 'Default', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_Typography_paragraph_weight', array( 'type' => 'select', 'label' => esc_html__( 'Paragraph Font Weight', 'anila' ), 'choices' => array( '400' => esc_html__( 'Default', 'anila' ), '600' => esc_html__( '600', 'anila' ), ), 'section' => 'anila_Typography', )); $wp_customize->add_section( 'anila_soical', array( 'title' => esc_html__( 'Social Network option', 'anila' ), 'description' => esc_html__( 'Connect with social network', 'anila' ), 'priority' => 24, )); $wp_customize->add_setting( 'anila_social_fb', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_fb', array( 'type' => 'select', 'label' => esc_html__( 'Do you want Facebook?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_fb_link', array( 'default' => esc_html__( ' ', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_fb_link', array( 'type' => 'text', 'label' => esc_html__( 'Facebook Url', 'anila' ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_twit', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_twit', array( 'type' => 'select', 'label' => esc_html__( 'Do you want Twitter?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_twit_link', array( 'default' => esc_html__( ' ', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_twit_link', array( 'type' => 'text', 'label' => esc_html__( 'Twitter Url', 'anila' ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_pint', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_pint', array( 'type' => 'select', 'label' => esc_html__( 'Do you want Pinterest?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_pint_link', array( 'default' => esc_html__( ' ', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_pint_link', array( 'type' => 'text', 'label' => esc_html__( 'Pinterest Url', 'anila' ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_reddit', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_reddit', array( 'type' => 'select', 'label' => esc_html__( 'Do you want Reddit?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_reddit_link', array( 'default' => esc_html__( ' ', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_reddit_link', array( 'type' => 'text', 'label' => esc_html__( 'Reddit Url', 'anila' ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_linkdn', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_linkdn', array( 'type' => 'select', 'label' => esc_html__( 'Do you want Linkndn?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_linkdn_link', array( 'default' => esc_html__( ' ', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_linkdn_link', array( 'type' => 'text', 'label' => esc_html__( 'LinkedIn Url', 'anila' ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_whatsapp', array( 'default' => esc_html__( 'Yes', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_whatsapp', array( 'type' => 'select', 'label' => esc_html__( 'Do you want WhatsApp?', 'anila' ), 'choices' => array( true => esc_html__( 'Yes', 'anila' ), false => esc_html__( 'No (Only Pro)', 'anila' ), ), 'section' => 'anila_soical', )); $wp_customize->add_setting( 'anila_social_whatsapp_link', array( 'default' => esc_html__( ' ', 'anila' ), 'sanitize_callback' => 'anila_sanitize_site_info', )); $wp_customize->add_control( 'anila_social_whatsapp_link', array( 'type' => 'text', 'label' => esc_html__( 'WhatsApp group Url', 'anila' ), 'section' => 'anila_soical', )); } add_action( 'customize_register', 'anila_customize_register' ); function anila_sanitize_site_info( $input ) { $allowed = array( 'a' => array( 'href' => array(), 'title' => array(), ), ); return wp_kses( $input, $allowed ); }