add_setting( $setting_id, array( 'default' => bgbn_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'maybe_hash_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $control_prefix . $setting_id, array( 'settings' => $setting_id, 'section' => $section, 'label' => __( 'Background Color', 'bgbn' ), 'priority' => $priority->add() ) ) ); // Background Image $setting_id = $setting_prefix . '-background-image'; $wp_customize->add_setting( $setting_id, array( 'default' => bgbn_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new bgbn_Customize_Image_Control( $wp_customize, $control_prefix . $setting_id, array( 'settings' => $setting_id, 'section' => $section, 'label' => __( 'Background Image', 'bgbn' ), 'priority' => $priority->add(), 'context' => $control_prefix . $setting_id ) ) ); // Background Repeat $setting_id = $setting_prefix . '-background-repeat'; $wp_customize->add_setting( $setting_id, array( 'default' => bgbn_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'bgbn_sanitize_choice', ) ); $wp_customize->add_control( $control_prefix . $setting_id, array( 'settings' => $setting_id, 'section' => $section, 'label' => __( 'Background Repeat', 'bgbn' ), 'type' => 'radio', 'choices' => bgbn_get_choices( $setting_id ), 'priority' => $priority->add() ) ); // Background Position $setting_id = $setting_prefix . '-background-position'; $wp_customize->add_setting( $setting_id, array( 'default' => bgbn_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'bgbn_sanitize_choice', ) ); $wp_customize->add_control( $control_prefix . $setting_id, array( 'settings' => $setting_id, 'section' => $section, 'label' => __( 'Background Position', 'bgbn' ), 'type' => 'radio', 'choices' => bgbn_get_choices( $setting_id ), 'priority' => $priority->add() ) ); // Background Size $setting_id = $setting_prefix . '-background-size'; $wp_customize->add_setting( $setting_id, array( 'default' => bgbn_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'bgbn_sanitize_choice', ) ); $wp_customize->add_control( $control_prefix . $setting_id, array( 'settings' => $setting_id, 'section' => $section, 'label' => __( 'Background Size', 'bgbn' ), 'type' => 'radio', 'choices' => bgbn_get_choices( $setting_id ), 'priority' => $priority->add() ) ); // Content options heading $setting_id = $setting_prefix . '-content-heading'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'heading', 'label' => __( 'Content Options', 'bgbn' ), 'priority' => $priority->add() ) ) ); // Underline content links $setting_id = $setting_prefix . '-content-link-underline'; $wp_customize->add_setting( $setting_id, array( 'default' => bgbn_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( $control_prefix . $setting_id, array( 'settings' => $setting_id, 'section' => $section, 'label' => __( 'Underline links in content', 'bgbn' ), 'type' => 'checkbox', 'priority' => $priority->add() ) ); } endif;