From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- inc/customizer/override-defaults.php | 70 ++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 inc/customizer/override-defaults.php (limited to 'inc/customizer/override-defaults.php') diff --git a/inc/customizer/override-defaults.php b/inc/customizer/override-defaults.php new file mode 100644 index 0000000..e23fa62 --- /dev/null +++ b/inc/customizer/override-defaults.php @@ -0,0 +1,70 @@ +get_section( 'title_tagline' )->priority = 5; +$wp_customize->get_section( 'title_tagline' )->panel = 'panel-header-group'; + +/** + * Override Settings + */ +$wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; +$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; +$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; +$wp_customize->get_setting( 'custom_logo' )->transport = 'refresh'; + +/** + * Override Controls + */ +$wp_customize->get_control( 'custom_logo' )->priority = 5; +$wp_customize->get_control( 'blogname' )->priority = 8; +$wp_customize->get_control( 'blogdescription' )->priority = 12; +$wp_customize->get_control( 'header_textcolor' )->priority = 9; +$wp_customize->get_control( 'site_icon' )->priority = 16; +$wp_customize->get_control( 'site_icon' )->label = ''; + +if ( isset( $wp_customize->selective_refresh ) ) { + $wp_customize->selective_refresh->add_partial( + 'blogname', + array( + 'selector' => '.main-header-bar .site-title a, .ast-small-footer-wrap .ast-footer-site-title', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Customizer_Partials::render_partial_site_title', + ) + ); +} + +if ( isset( $wp_customize->selective_refresh ) ) { + $wp_customize->selective_refresh->add_partial( + 'blogdescription', + array( + 'selector' => '.main-header-bar .site-description', + 'container_inclusive' => false, + 'render_callback' => 'Astra_Customizer_Partials::render_partial_site_tagline', + ) + ); +} + +/* + * Modify WooCommerce default section priorities +*/ +if ( class_exists( 'WooCommerce' ) ) { + $wp_customize->get_section( 'woocommerce_store_notice' )->priority = 9; + $wp_customize->get_section( 'woocommerce_product_catalog' )->priority = 11; + $wp_customize->get_section( 'woocommerce_checkout' )->priority = 21; + $wp_customize->get_panel( 'woocommerce' )->priority = 70; +} -- cgit v1.2.3-70-g09d2