get_section( $section )->title = __( 'Background', 'bgbn' ); // Move Background Color to Background section $wp_customize->get_control( 'background_color' )->section = $section; // Background note $setting_id = 'background-info'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'text', 'description' => __( 'With the Site Layout option (under General) set to "Full Width", the background color and image will not be visible.', 'bgbn' ), 'priority' => $priority->add() ) ) ); // Reset priorities on existing controls $wp_customize->get_control( 'background_color' )->priority = $priority->add(); $wp_customize->get_control( 'background_image' )->priority = $priority->add(); $wp_customize->get_control( 'background_repeat' )->priority = $priority->add(); $wp_customize->get_control( 'background_position_x' )->priority = $priority->add(); $wp_customize->get_control( 'background_attachment' )->priority = $priority->add(); // Background Size $setting_id = '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() ) ); } endif; add_action( 'customize_register', 'bgbn_customizer_background', 20 );