selective_refresh)
? "postMessage"
: "refresh";
$wp_customize->get_setting("header_textcolor");
// Remove the core header textcolor control, as it shares the main text color.
$wp_customize->remove_control("header_textcolor");
$wp_customize->add_setting("header_title_color", array(
"default" => "#fff",
"sanitize_callback" => "sanitize_hex_color",
));
$wp_customize->add_control(
new WP_Customize_Color_Control($wp_customize, "header_title_color", array(
"label" => esc_html__("Header Text Color", "astran"),
"description" => esc_html__("Header Text Title Color", "astran"),
"section" => "colors",
))
);
$wp_customize->add_setting("header_tagline_color", array(
"default" => "#fff",
"sanitize_callback" => "sanitize_hex_color",
));
$wp_customize->add_control(
new WP_Customize_Color_Control($wp_customize, "header_tagline_color", array(
"label" => esc_html__("Header Tagline Color", "astran"),
"description" => esc_html__("Header Tagline Color", "astran"),
"section" => "colors",
))
);
/* Sections Settings */
$wp_customize->add_panel("section_settings", array(
"priority" => 110,
"capability" => "edit_theme_options",
"title" => esc_html__("Astran Theme settings", "astran"),
"description" =>
__("Drag and Drop to Reorder", "astran") .
'
',
));
$wp_customize->add_panel("home_section_settings", array(
"priority" => 111,
"capability" => "edit_theme_options",
"title" => esc_html__("Astran Front Page Sections", "astran"),
));
//Latest News Section
$wp_customize->add_section("astran_layout_sidebars", array(
"title" => esc_html__("Sidebar Layout", "astran"),
"panel" => "section_settings",
"priority" => 9,
));
$wp_customize->add_setting("astran_blog_temp_layout", array(
"sanitize_callback" => "astran_sanitize_select",
"default" => "rightsidebar",
));
$wp_customize->add_control("astran_blog_temp_layout", array(
"type" => "select",
"label" => esc_html__("Blog Template Layout", "astran"),
"description" => esc_html__(
"This will be apply for blog template layout",
"astran"
),
"section" => "astran_layout_sidebars",
"choices" => array(
"rightsidebar" => esc_html__("Right sidebar", "astran"),
"leftsidebar" => esc_html__("Left sidebar", "astran"),
"fullwidth" => esc_html__("No sidebar", "astran"),
),
));
$wp_customize->add_setting("astran_single_blog_temp_layout", array(
"sanitize_callback" => "astran_sanitize_select",
"default" => "rightsidebar",
));
$wp_customize->add_control("astran_single_blog_temp_layout", array(
"type" => "select",
"label" => esc_html__("Single Post Template Layout", "astran"),
"description" => esc_html__(
"This will be apply for single Post template layout",
"astran"
),
"section" => "astran_layout_sidebars",
"choices" => array(
"rightsidebar" => esc_html__("Right sidebar", "astran"),
"leftsidebar" => esc_html__("Left sidebar", "astran"),
"fullwidth" => esc_html__("No sidebar", "astran"),
),
));
$wp_customize->add_setting("astran_page_temp_layout", array(
"sanitize_callback" => "astran_sanitize_select",
"default" => "rightsidebar",
));
$wp_customize->add_control("astran_page_temp_layout", array(
"type" => "select",
"label" => esc_html__("Page Template Layout", "astran"),
"description" => esc_html__(
"This will be apply for Page template layout",
"astran"
),
"section" => "astran_layout_sidebars",
"choices" => array(
"rightsidebar" => esc_html__("Right sidebar", "astran"),
"leftsidebar" => esc_html__("Left sidebar", "astran"),
"fullwidth" => esc_html__("No sidebar", "astran"),
),
));
$wp_customize->add_section("astran_post_settings", array(
"priority" => null,
"title" => esc_html__("Post Options", "astran"),
"description" => "",
"panel" => "section_settings",
));
$wp_customize->add_setting("astran_single_post_thumb", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 1,
));
$wp_customize->add_control("astran_single_post_thumb", array(
"type" => "checkbox",
"label" => esc_html__("Enable Single Post Thumbnail", "astran"),
"section" => "astran_post_settings",
"description" => esc_html__(
"Check this box to enable post thumbnail on single post.",
"astran"
),
));
$wp_customize->add_setting("astran_single_post_meta", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 1,
));
$wp_customize->add_control("astran_single_post_meta", array(
"type" => "checkbox",
"label" => esc_html__("Enable Single Post Meta", "astran"),
"section" => "astran_post_settings",
"description" => esc_html__(
"Check this box to enable single post meta such as post date, author, category, comment etc.",
"astran"
),
));
$wp_customize->add_setting("astran_single_post_title", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 1,
));
$wp_customize->add_control("astran_single_post_title", array(
"type" => "checkbox",
"label" => esc_html__("Enable Single Post Title", "astran"),
"section" => "astran_post_settings",
"description" => esc_html__(
"Check this box to enable title on single post.",
"astran"
),
));
$wp_customize->add_section("astran_footer_settings", array(
"priority" => null,
"title" => esc_html__("Footer Options", "astran"),
"description" => "",
"panel" => "section_settings",
));
$wp_customize->add_setting("astran_top_footer_enable", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_top_footer_enable", array(
"type" => "checkbox",
"label" => esc_html__("Disable Footer Top Section?", "astran"),
"section" => "astran_footer_settings",
"description" => esc_html__(
"Check this box to Disable Top Footer section.",
"astran"
),
));
$wp_customize->add_setting("astran_footer_widgets_column", array(
"capability" => "edit_theme_options",
"default" => "mt-column-3",
"sanitize_callback" => "sanitize_text_field",
));
$wp_customize->add_control("astran_footer_widgets_column", array(
"label" => esc_html__("Footer Widget Column", "astran"),
"section" => "astran_footer_settings",
"type" => "select",
"settings" => "astran_footer_widgets_column",
"priority" => 10,
"choices" => array(
"mt-column-1" => esc_html__("Col 1", "astran"),
"mt-column-2" => esc_html__("Col 2", "astran"),
"mt-column-3" => esc_html__("Col 3", "astran"),
"mt-column-4" => esc_html__("Col 4", "astran"),
),
));
$wp_customize->add_setting("astran_color_scheme", array(
"default" => esc_html__("#1b1b1b", "astran"),
"sanitize_callback" => "sanitize_hex_color",
));
$wp_customize->add_control(
new WP_Customize_Color_Control($wp_customize, "astran_color_scheme", array(
"label" => esc_html__("Background Color", "astran"),
"description" => esc_html__(
"Change Footer Background Color",
"astran"
),
"section" => "astran_footer_settings",
"settings" => "astran_color_scheme",
))
);
$wp_customize->add_setting("astran_footer_widgets_title_color", array(
"default" => esc_html__("#fff", "astran"),
"sanitize_callback" => "sanitize_hex_color",
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
"astran_footer_widgets_title_color",
array(
"label" => esc_html__("Widget Title Color", "astran"),
"section" => "astran_footer_settings",
)
)
);
$wp_customize->add_setting("astran_footer_widgets_text_color", array(
"default" => esc_html__("#fff", "astran"),
"sanitize_callback" => "sanitize_hex_color",
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
"astran_footer_widgets_text_color",
array(
"label" => esc_html__("Widget Text Color", "astran"),
"section" => "astran_footer_settings",
)
)
);
$wp_customize->add_section("astran_404_section", array(
"priority" => null,
"title" => esc_html__("404 Page Setting", "astran"),
"description" => "",
"panel" => "section_settings",
));
$wp_customize->add_setting("404_background_image", array(
"default" => ASTRAN_THEME_URI . "/resources/images/404.jpg",
"sanitize_callback" => "esc_url_raw",
));
$wp_customize->add_control(
new WP_Customize_Image_Control($wp_customize, "404_background_image", array(
"label" => __("404 Background Image", "astran"),
"section" => "astran_404_section",
"settings" => "404_background_image",
))
);
$wp_customize->add_setting("astran_404_opacity_section", array(
"default" => ".75",
"sanitize_callback" => "astran_sanitize_float_theme",
));
$wp_customize->add_control("astran_404_opacity_section", array(
"label" => __("404 Overlay Opacity", "astran"),
"section" => "astran_404_section",
"type" => "number",
"input_attrs" => array(
"min" => "0.01",
"step" => "0.01",
"max" => "1",
),
));
$wp_customize->add_setting("astran_404_bg_color", array(
"sanitize_callback" => "sanitize_hex_color",
"default" => "#000",
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
"astran_404_bg_color",
array(
"label" => esc_html__("404 Background Color", "astran"),
"section" => "astran_404_section",
"description" => esc_html__(
"Select To Change 404 Background Color",
"astran"
),
)
)
);
$wp_customize->add_setting("astran_404_title_settings", array(
"sanitize_callback" => "sanitize_text_field",
"default" => "404",
));
$wp_customize->add_control("astran_404_title_settings", array(
"type" => "text",
"label" => esc_html__("404 Title", "astran"),
"section" => "astran_404_section",
));
$wp_customize->add_setting("astran_404_subtitle", array(
"sanitize_callback" => "sanitize_text_field",
"default" => "Oops! Page Not Found",
));
$wp_customize->add_control("astran_404_subtitle", array(
"type" => "text",
"label" => esc_html__("404 Sub Title", "astran"),
"section" => "astran_404_section",
));
$wp_customize->add_setting("astran_404_textarea", array(
"sanitize_callback" => "sanitize_text_field",
"default" =>
"The page you are looking for might have been removed had its name changed or is temporarily unavailable.",
));
$wp_customize->add_control("astran_404_textarea", array(
"type" => "textarea",
"label" => esc_html__("404 Description", "astran"),
"section" => "astran_404_section",
));
$wp_customize->add_setting("astran_404_button", array(
"sanitize_callback" => "sanitize_text_field",
"default" => "Return To Home",
));
$wp_customize->add_control("astran_404_button", array(
"type" => "text",
"label" => esc_html__("404 Button Text", "astran"),
"section" => "astran_404_section",
));
$wp_customize->add_setting("astran_404_button_url", array(
"sanitize_callback" => "esc_ur_raw",
"default" => "#",
));
$wp_customize->add_control("astran_404_button_url", array(
"type" => "url",
"label" => esc_html__("404 Button Url ", "astran"),
"section" => "astran_404_section",
));
$wp_customize->add_setting("astran_theme_color_scheme", array(
"default" => esc_html__("#3f51b5", "astran"),
"sanitize_callback" => "sanitize_hex_color",
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
"astran_theme_color_scheme",
array(
"label" => esc_html__("Theme Color", "astran"),
"description" => esc_html__("Change Theme Color", "astran"),
"section" => "colors",
"settings" => "astran_theme_color_scheme",
)
)
);
//Latest News Section
$wp_customize->add_section("astran_top_header", array(
"title" => esc_html__("Top Header", "astran"),
"panel" => "section_settings",
"priority" => 7,
));
$wp_customize->add_setting("astran_top_header_enable", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_top_header_enable", array(
"type" => "checkbox",
"label" => esc_html__("Enable Top Header Section?", "astran"),
"section" => "astran_top_header",
"description" => esc_html__(
"Check this box to Enable Top Header section.",
"astran"
),
));
// Navigation Button
$wp_customize->add_setting("astran_header_mail", array(
"sanitize_callback" => "astran_sanitize_text",
"default" => "",
));
$wp_customize->add_control("astran_header_mail", array(
"label" => esc_html__("Header Email", "astran"),
"section" => "astran_top_header",
"type" => "text",
));
$wp_customize->add_setting("astran_header_phone", array(
"sanitize_callback" => "astran_sanitize_text",
"default" => "",
));
$wp_customize->add_control("astran_header_phone", array(
"label" => esc_html__("Header Contact", "astran"),
"section" => "astran_top_header",
"type" => "text",
));
$wp_customize->add_setting("astran_header_address", array(
"sanitize_callback" => "astran_sanitize_text",
"default" => "",
));
$wp_customize->add_control("astran_header_address", array(
"label" => esc_html__("Header Address", "astran"),
"section" => "astran_top_header",
"type" => "text",
));
$wp_customize->add_setting("astran_home_facebook_url", array(
"default" => "",
"sanitize_callback" => "esc_url_raw",
));
$wp_customize->add_control("astran_home_facebook_url", array(
"settings" => "astran_home_facebook_url",
"section" => "astran_top_header",
"type" => "url",
"label" => esc_html__("Facebook Url", "astran"),
));
$wp_customize->add_setting("astran_home_twitter_url", array(
"default" => "",
"sanitize_callback" => "esc_url_raw",
));
$wp_customize->add_control("astran_home_twitter_url", array(
"settings" => "astran_home_twitter_url",
"section" => "astran_top_header",
"type" => "url",
"label" => esc_html__("Twitter Url", "astran"),
));
$wp_customize->add_setting("astran_home_instagram_url", array(
"default" => "",
"sanitize_callback" => "esc_url_raw",
));
$wp_customize->add_control("astran_home_instagram_url", array(
"settings" => "astran_home_instagram_url",
"section" => "astran_top_header",
"type" => "url",
"label" => esc_html__("Instagram Url", "astran"),
));
$wp_customize->add_setting("astran_home_youtube_url", array(
"default" => "",
"sanitize_callback" => "esc_url_raw",
));
$wp_customize->add_control("astran_home_youtube_url", array(
"settings" => "astran_home_youtube_url",
"section" => "astran_top_header",
"type" => "url",
"label" => esc_html__("Youtube Url", "astran"),
));
$wp_customize->add_section("astran_middle_header", array(
"title" => esc_html__("Navigation Setting", "astran"),
"panel" => "section_settings",
"priority" => 8,
));
$wp_customize->add_setting("astran_middle_header_enable", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 1,
));
$wp_customize->add_control("astran_middle_header_enable", array(
"type" => "checkbox",
"label" => esc_html__("Enable Search Icon", "astran"),
"section" => "astran_middle_header",
"description" => esc_html__(
"Check this box to Enable Search Icon",
"astran"
),
));
$wp_customize->add_setting("astran_middle_header_bar_enable", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 1,
));
$wp_customize->add_control("astran_middle_header_bar_enable", array(
"type" => "checkbox",
"label" => esc_html__("Enable Top Modal", "astran"),
"section" => "astran_middle_header",
"description" => esc_html__(
"Check this box to Enable Top Modal",
"astran"
),
));
$wp_customize->add_section("astran_breadcrumb_settings", array(
"priority" => null,
"title" => esc_html__("Header/Breadcrumb Options", "astran"),
"description" => "",
"panel" => "section_settings",
));
$wp_customize->add_setting("astran_header_bg_color", array(
"sanitize_callback" => "sanitize_hex_color",
"default" => "#000",
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
"astran_header_bg_color",
array(
"label" => esc_html__("Header Background Color", "astran"),
"section" => "astran_breadcrumb_settings",
"description" => esc_html__(
"Select To Change Header Background Color",
"astran"
),
)
)
);
$wp_customize->add_setting("astran_breadcrum_opacity_section", array(
"default" => ".75",
"sanitize_callback" => "astran_sanitize_float_theme",
));
$wp_customize->add_control("astran_breadcrum_opacity_section", array(
"label" => __("Breadcrumbs Overlay Opacity", "astran"),
"section" => "astran_breadcrumb_settings",
"type" => "number",
"input_attrs" => array(
"min" => "0.01",
"step" => "0.01",
"max" => "1",
),
));
$wp_customize->add_setting("braedcrumb_height", array(
"default" => "390",
"sanitize_callback" => "astran_sanitize_float_theme",
));
$wp_customize->add_control("braedcrumb_height", array(
"label" => __("Breadcrumb Header Height", "astran"),
"section" => "astran_breadcrumb_settings",
"type" => "number",
"input_attrs" => array(
"min" => "20",
"step" => "",
"max" => "100",
),
"priority" => 10,
));
$wp_customize->add_setting("astran_breadcrumb_title_color", array(
"sanitize_callback" => "sanitize_hex_color",
"default" => "#fff",
));
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
"astran_breadcrumb_title_color",
array(
"label" => esc_html__("Breadcrumb Title Color", "astran"),
"section" => "astran_breadcrumb_settings",
"description" => esc_html__(
"Select To Change Breadcrumb Title Color",
"astran"
),
)
)
);
$wp_customize->add_setting("astran_header_show_blog", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_header_show_blog", array(
"type" => "checkbox",
"label" => esc_html__("Disable Blog Page Header", "astran"),
"section" => "astran_breadcrumb_settings",
"description" => esc_html__(
"Check this box to Disable Page Header on Blog Page",
"astran"
),
));
$wp_customize->add_setting("astran_header_show_single_blog", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_header_show_single_blog", array(
"type" => "checkbox",
"label" => esc_html__("Disable Single Post Header", "astran"),
"section" => "astran_breadcrumb_settings",
"description" => esc_html__(
"Check this box to Disable Page Header on Single Post",
"astran"
),
));
$wp_customize->add_setting("astran_header_show_single_page", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_header_show_single_page", array(
"type" => "checkbox",
"label" => esc_html__("Disable Single Page Header", "astran"),
"section" => "astran_breadcrumb_settings",
"description" => esc_html__(
"Check this box to Disable Page Header on Single Page",
"astran"
),
));
$wp_customize->add_setting("astran_header_show_breadcrumb", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_header_show_breadcrumb", array(
"type" => "checkbox",
"label" => esc_html__("Disable Breadcrumbs", "astran"),
"section" => "astran_breadcrumb_settings",
"description" => esc_html__(
"Check this box to Disable Breadcrumbs on all pages and posts",
"astran"
),
));
$wp_customize->add_section("astran_fonts_style", array(
"title" => esc_html__("Theme Typography", "astran"),
"panel" => "section_settings",
));
$wp_customize->add_setting("astran_show_typography", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_show_typography", array(
"type" => "checkbox",
"label" => esc_html__("Enable Typography", "astran"),
"section" => "astran_fonts_style",
"description" => esc_html__(
"Check this box to Enable Custom Typography",
"astran"
),
));
$wp_customize->add_setting("astran_typography_base_font_family", array(
"sanitize_callback" => "sanitize_text_field",
"default" => "",
));
$wp_customize->add_control(
new AvadantaWP_Customizer_Typography_Control(
$wp_customize,
"astran_typography_base_font_family",
array(
"label" => esc_html__("Font Family", "astran"),
"section" => "astran_fonts_style",
"settings" => "astran_typography_base_font_family",
"type" => "select",
)
)
);
$wp_customize->add_setting("astran_typography_h1_font_family", array(
"sanitize_callback" => "sanitize_text_field",
"default" => "",
));
$wp_customize->add_control(
new AvadantaWP_Customizer_Typography_Control(
$wp_customize,
"astran_typography_h1_font_family",
array(
"label" => esc_html__("H1 to H6 Font Family", "astran"),
"section" => "astran_fonts_style",
"settings" => "astran_typography_h1_font_family",
"type" => "select",
)
)
);
$wp_customize->add_section("astran_sticky_settings", array(
"priority" => null,
"title" => esc_html__("Sticky Menu/Scroll Up Option", "astran"),
"description" => "",
"panel" => "section_settings",
));
$wp_customize->add_setting("astran_sticky_thumb", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_sticky_thumb", array(
"type" => "checkbox",
"label" => esc_html__("Disable Sticky Menu", "astran"),
"section" => "astran_sticky_settings",
"description" => esc_html__(
"Check this box to Disable Sticky Menu.",
"astran"
),
));
$wp_customize->add_setting("astran_scroll_thumb", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_scroll_thumb", array(
"type" => "checkbox",
"label" => esc_html__("Disable Scroll To Top", "astran"),
"section" => "astran_sticky_settings",
"description" => esc_html__(
"Check this box to Disable Scroll To Top.",
"astran"
),
));
$wp_customize->add_setting("astran_preloader_option", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_preloader_option", array(
"type" => "checkbox",
"label" => esc_html__("Disable Preloader Option", "astran"),
"section" => "astran_sticky_settings",
"description" => esc_html__(
"Check this box to Disable Preloader",
"astran"
),
));
$wp_customize->add_section("astran_bottom_footer_settings", array(
"priority" => null,
"title" => esc_html__("Bottom Footer Options", "astran"),
"description" => "",
"panel" => "section_settings",
));
$wp_customize->add_setting("astran_copyright_enable", array(
"sanitize_callback" => "astran_sanitize_checkbox",
"default" => 0,
));
$wp_customize->add_control("astran_copyright_enable", array(
"type" => "checkbox",
"label" => esc_html__("Disable Copyright Section?", "astran"),
"section" => "astran_bottom_footer_settings",
"description" => esc_html__(
"Check this box to Disable copyright section.",
"astran"
),
));
$wp_customize->add_setting("astran_copyright_text", array(
"sanitize_callback" => "astran_sanitize_text",
/* translators: %s: Copyright Text */
"default" => sprintf(
__('Proudly powered by %1$s WordPress %3$s', "astran"),
'',
'',
""
),
));
$wp_customize->add_control("astran_copyright_text", array(
"label" => esc_html__("Copyright Content Here", "astran"),
"section" => "astran_bottom_footer_settings",
"type" => "textarea",
));
/**
* Section Reorder
*/
$wp_customize->add_section( 'astran_homepage_section_reorder', array(
'title' => esc_html__( 'Home Section Re Order', 'astran' ),
'priority' => 5,
'panel' => 'home_section_settings',
) );
$wp_customize->add_setting( 'astran_homepage_section_order_list', array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Avadanta_Section_Re_Order( $wp_customize, 'astran_homepage_section_order_list', array(
'type' => 'dragndrop',
'priority' => 3,
'label' => esc_html__( 'Home Section Re Order', 'astran' ),
'section' => 'astran_homepage_section_reorder',
'choices' => array(
'aboutus' => esc_html__( 'About Us', 'astran' ),
'features' => esc_html__( 'Features Services', 'astran' ),
'cta' => esc_html__( 'Callout Section', 'astran' ),
'gallery' => esc_html__( 'Gallery Section', 'astran' ),
'testimonial' => esc_html__( 'Testimonial Section', 'astran' ),
'ourteam' => esc_html__( 'Team Section', 'astran' ),
'ourblog' => esc_html__( 'News Section', 'astran' ),
'courses' => esc_html__( 'Client Section', 'astran' )
),
) ) );
}
add_action("customize_register", "astran_sections_settings");
/**
* Add selective refresh for Front page section section controls.
*/
function avadanta_register_home_section_partials($wp_customize)
{
//News
$wp_customize->selective_refresh->add_partial("home_news_section_title", array(
"selector" => ".section-module.blog .section-subtitle",
"settings" => "home_news_section_title",
"render_callback" => "avadanta_home_news_section_title_render_callback",
));
$wp_customize->selective_refresh->add_partial(
"home_news_section_discription",
array(
"selector" => ".section-module.blog .section-title",
"settings" => "home_news_section_discription",
"render_callback" =>
"avadanta_home_news_section_discription_render_callback",
)
);
}
add_action("customize_register", "avadanta_register_home_section_partials");
function avadanta_home_news_section_title_render_callback()
{
return get_theme_mod("home_news_section_title");
}
function avadanta_home_news_section_discription_render_callback()
{
return get_theme_mod("home_news_section_discription");
}
function avadanta_sanitize_radio($input, $setting)
{
//input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only
$input = sanitize_key($input);
//get the list of possible radio box options
$choices = $setting->manager->get_control($setting->id)->choices;
//return input if valid or return default option
return array_key_exists($input, $choices) ? $input : $setting->default;
}
function astran_sanitize_float_theme($input)
{
return filter_var(
$input,
FILTER_SANITIZE_NUMBER_FLOAT,
FILTER_FLAG_ALLOW_FRACTION
);
}
require ASTRAN_THEME_DIR .
"/lib/customizer/astran-customize-typography-control.php";
require get_template_directory() .
"/lib/customizer-plugin-notice/astran-customizer-notify.php";
$teczilla_config_customizer = array(
"recommended_plugins" => array(
"avadanta-companion" => array(
"recommended" => true,
"description" => sprintf(
__(
"Install and activate Avadanta Companion For HomePage",
"astran"
)
),
),
),
"recommended_actions" => [],
"recommended_actions_title" => esc_html__("Recommended Actions", "astran"),
"recommended_plugins_title" => esc_html__("Recommended Plugin", "astran"),
"install_button_label" => esc_html__("Install and Activate", "astran"),
"activate_button_label" => esc_html__("Activate", "astran"),
"avadanta_deactivate_button_label" => esc_html__("Deactivate", "astran"),
);
Avadanta_Customizer_Notify::init(
apply_filters(
"avadanta_customizer_notify_array",
$teczilla_config_customizer
)
);