'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[section_padding]',
'label' => esc_html__( 'Section Height', 'Divi' ),
'section' => 'et_divi_general_layout',
$wp_customize->add_setting(
'et_divi[phone_section_height]',
'default' => et_get_option( 'tablet_section_height', '50' ),
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[phone_section_height]',
'label' => esc_html__( 'Section Height', 'Divi' ),
'section' => 'et_divi_mobile_phone',
$wp_customize->add_setting(
'et_divi[tablet_section_height]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[tablet_section_height]',
'label' => esc_html__( 'Section Height', 'Divi' ),
'section' => 'et_divi_mobile_tablet',
$wp_customize->add_setting(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'label' => esc_html__( 'Row Height', 'Divi' ),
'section' => 'et_divi_general_layout',
$wp_customize->add_setting(
'et_divi[phone_row_height]',
'default' => et_get_option( 'tablet_row_height', '30' ),
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[phone_row_height]',
'label' => esc_html__( 'Row Height', 'Divi' ),
'section' => 'et_divi_mobile_phone',
$wp_customize->add_setting(
'et_divi[tablet_row_height]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[tablet_row_height]',
'label' => esc_html__( 'Row Height', 'Divi' ),
'section' => 'et_divi_mobile_tablet',
$wp_customize->add_setting(
'et_divi[cover_background]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'wp_validate_boolean',
$wp_customize->add_control(
'et_divi[cover_background]',
'label' => esc_html__( 'Stretch Background Image', 'Divi' ),
'section' => 'et_divi_general_background',
if ( ! is_null( $wp_customize->get_setting( 'background_color' ) ) ) {
$wp_customize->add_control(
new WP_Customize_Color_Control(
'label' => esc_html__( 'Background Color', 'Divi' ),
'section' => 'et_divi_general_background',
if ( ! is_null( $wp_customize->get_setting( 'background_image' ) ) ) {
$wp_customize->add_control(
new WP_Customize_Image_Control(
'label' => esc_html__( 'Background Image', 'Divi' ),
'section' => 'et_divi_general_background',
// Remove default background_repeat setting and control since native
// background_repeat field has different different settings.
$wp_customize->remove_setting( 'background_repeat' );
$wp_customize->remove_control( 'background_repeat' );
// Re-defined Divi specific background repeat option.
$wp_customize->add_setting(
'default' => apply_filters( 'et_divi_background_repeat_default', 'repeat' ),
'sanitize_callback' => 'et_sanitize_background_repeat',
'theme_supports' => 'custom-background',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
$wp_customize->add_control(
'label' => esc_html__( 'Background Repeat', 'Divi' ),
'section' => 'et_divi_general_background',
'choices' => et_divi_background_repeat_choices(),
$wp_customize->add_control(
'label' => esc_html__( 'Background Position', 'Divi' ),
'section' => 'et_divi_general_background',
'left' => esc_html__( 'Left', 'Divi' ),
'center' => esc_html__( 'Center', 'Divi' ),
'right' => esc_html__( 'Right', 'Divi' ),
// Remove default background_attachment setting and control since native
// background_attachment field has different different settings.
$wp_customize->remove_setting( 'background_attachment' );
$wp_customize->remove_control( 'background_attachment' );
$wp_customize->add_setting(
'default' => apply_filters( 'et_sanitize_background_attachment_default', 'scroll' ),
'sanitize_callback' => 'et_sanitize_background_attachment',
'theme_supports' => 'custom-background',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
$wp_customize->add_control(
'label' => esc_html__( 'Background Position', 'Divi' ),
'section' => 'et_divi_general_background',
'choices' => et_divi_background_attachment_choices(),
$wp_customize->add_setting(
'et_divi[body_font_size]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[body_font_size]',
'label' => esc_html__( 'Body Text Size', 'Divi' ),
'section' => 'et_divi_general_typography',
$wp_customize->add_setting(
'et_divi[body_font_height]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'et_sanitize_float_number',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[body_font_height]',
'label' => esc_html__( 'Body Line Height', 'Divi' ),
'section' => 'et_divi_general_typography',
$wp_customize->add_setting(
'et_divi[phone_body_font_size]',
'default' => et_get_option( 'tablet_body_font_size', '14' ),
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[phone_body_font_size]',
'label' => esc_html__( 'Body Text Size', 'Divi' ),
'section' => 'et_divi_mobile_phone',
$wp_customize->add_setting(
'et_divi[tablet_body_font_size]',
'default' => et_get_option( 'body_font_size', '14' ),
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[tablet_body_font_size]',
'label' => esc_html__( 'Body Text Size', 'Divi' ),
'section' => 'et_divi_mobile_tablet',
$wp_customize->add_setting(
'et_divi[body_header_size]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'absint',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[body_header_size]',
'label' => esc_html__( 'Header Text Size', 'Divi' ),
'section' => 'et_divi_general_typography',
$wp_customize->add_setting(
'et_divi[body_header_spacing]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'et_sanitize_int_number',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[body_header_spacing]',
'label' => esc_html__( 'Header Letter Spacing', 'Divi' ),
'section' => 'et_divi_general_typography',
$wp_customize->add_setting(
'et_divi[body_header_height]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'et_sanitize_float_number',
$wp_customize->add_control(
new ET_Divi_Range_Option(
'et_divi[body_header_height]',
'label' => esc_html__( 'Header Line Height', 'Divi' ),
'section' => 'et_divi_general_typography',
$wp_customize->add_setting(
'et_divi[body_header_style]',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'et_sanitize_font_style',
$wp_customize->add_control(
new ET_Divi_Font_Style_Option(
'et_divi[body_header_style]',
'label' => esc_html__( 'Header Font Style', 'Divi' ),
'section' => 'et_divi_general_typography',
'choices' => et_divi_font_style_choices(),
$wp_customize->add_setting(
'et_divi[phone_header_font_size]',