get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'background_color' )->transport = 'refresh'; $wp_customize->get_setting( 'background_image' )->transport = 'refresh'; // Show site title $wp_customize->add_setting( 'alurra_show_site_title', array( 'default' => true, 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_checkbox', ) ); $wp_customize->add_control( new Alurra_Toggle_Control( $wp_customize, 'alurra_show_site_title', array( 'label' => esc_html__( 'Show the Site Title', 'alurra' ), 'description' => esc_html__( 'Show or hide the site title.', 'alurra' ), 'section' => 'title_tagline', ) ) ); // Show site description $wp_customize->add_setting( 'alurra_show_site_desc', array( 'default' => true, 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_checkbox', ) ); $wp_customize->add_control( new Alurra_Toggle_Control( $wp_customize, 'alurra_show_site_desc', array( 'label' => esc_html__( 'Show the Site Description', 'alurra' ), 'description' => esc_html__( 'Show or hide the site tagline [description].', 'alurra' ), 'section' => 'title_tagline', ) ) ); // Site title colour $wp_customize->add_setting( 'alurra_header_title_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_header_title_colour', array( 'label' => esc_html__( 'Site Title Colour', 'alurra' ), 'description' => esc_html__( 'Sets the site title colour in the header area.', 'alurra' ), 'section' => 'title_tagline', ) ) ); // Site tagline colour $wp_customize->add_setting( 'alurra_header_tagline_colour', array( 'default' => '#fff', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'alurra_header_tagline_colour', array( 'label' => esc_html__( 'Site Tagline Colour', 'alurra' ), 'description' => esc_html__( 'Sets the site tagline [ description ] colour in the header area.', 'alurra' ), 'section' => 'title_tagline', ) ) ); // Site Title Font $wp_customize->add_setting( 'site_title_font', array( 'default' => array( 'font-family' => 'Playfair Display', 'variant' => '700', ), 'sanitize_callback' => array( 'Alurra_Fonts', 'sanitize_typography' ) ) ); $wp_customize->add_control( new Alurra_Typography_Control( $wp_customize, 'site_title_font', array( 'label' => esc_html__( 'Site Title Font', 'alurra' ), 'description' => esc_html__( 'Site title and tagline font.', 'alurra' ), 'section' => 'title_tagline', 'priority' => 60, ) ) ); // Site Title Font Size for the custom header image $wp_customize->add_setting( 'site_title_font_size', array( 'default' => 3, 'transport' => 'postMessage', 'sanitize_callback' => 'alurra_sanitize_number_decimal', ) ); $wp_customize->add_control( new Alurra_Slider_Control( $wp_customize, 'site_title_font_size', array( 'section' => 'title_tagline', 'label' => esc_html__( 'Site Title Font Size', 'alurra' ), 'description' => esc_html__( 'Change the font size of your site title for the Custom Header Image.', 'alurra' ), 'priority' => 65, 'choices' => array( 'min' => 1, 'max' => 10, 'step' => 0.25, ) ) ) ); // Site Title Font Size for the basic headers $wp_customize->add_setting( 'site_title_font_size_basic', array( 'default' => 2, 'sanitize_callback' => 'alurra_sanitize_number_decimal', ) ); $wp_customize->add_control( new Alurra_Slider_Control( $wp_customize, 'site_title_font_size_basic', array( 'section' => 'title_tagline', 'label' => esc_html__( 'Site Title Font Size Basic Headers', 'alurra' ), 'description' => esc_html__( 'Change the font size of your site title when using the basic header styles.', 'alurra' ), 'priority' => 65, 'choices' => array( 'min' => 1, 'max' => 10, 'step' => 0.25, ) ) ) ); } add_action( 'customize_register', 'alurra_customize_register' );