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' => __( 'Footer Layout', 'bgbn' ), 'type' => 'select', 'choices' => bgbn_get_choices( $setting_id ), 'priority' => $priority->add() ) ); // Footer layout line $setting_id = $setting_prefix . '-layout-line'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'line', 'priority' => $priority->add() ) ) ); // Footer text $setting_id = $setting_prefix . '-text'; $wp_customize->add_setting( $setting_id, array( 'default' => bgbn_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'bgbn_sanitize_text', 'transport' => 'postMessage' // Asynchronous preview ) ); $wp_customize->add_control( $control_prefix . $setting_id, array( 'settings' => $setting_id, 'section' => $section, 'label' => __( 'Footer Text', 'bgbn' ), 'type' => 'text', 'priority' => $priority->add() ) ); // Footer text color $setting_id = $setting_prefix . '-text-color'; $wp_customize->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' => __( 'Footer Text Color', 'bgbn' ), 'priority' => $priority->add() ) ) ); // Footer border color $setting_id = $setting_prefix . '-border-color'; $wp_customize->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' => __( 'Footer Border Color', 'bgbn' ), 'priority' => $priority->add() ) ) ); // Background color $setting_id = $setting_prefix . '-background-color'; $wp_customize->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' => __( 'Footer 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' => __( 'Footer 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() ) ); // Footer background line $setting_id = $setting_prefix . '-background-line'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'line', 'priority' => $priority->add() ) ) ); // Footer widget areas $setting_id = $setting_prefix . '-widget-areas'; $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' => __( 'Footer Widget Areas', 'bgbn' ), 'type' => 'select', 'choices' => bgbn_get_choices( $setting_id ), 'priority' => $priority->add() ) ); // Footer options heading $setting_id = $setting_prefix . '-options-heading'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'heading', 'label' => __( 'Footer Options', 'bgbn' ), 'priority' => $priority->add() ) ) ); // Show social icons $setting_id = $setting_prefix . '-show-social'; $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' => __( 'Show social icons', 'bgbn' ), 'type' => 'checkbox', 'priority' => $priority->add() ) ); if ( ! bgbn_is_plus() ) { // White Label line $setting_id = $setting_prefix . '-whitelabel-line'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'line', 'priority' => $priority->add() ) ) ); // White Label heading $setting_id = $setting_prefix . '-whitelabel-heading'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'heading', 'label' => __( 'White Label', 'bgbn' ), 'priority' => $priority->add() ) ) ); // White Label info $setting_id = $setting_prefix . '-whitelabel-bgbn-plus'; $wp_customize->add_control( new bgbn_Customize_Misc_Control( $wp_customize, $control_prefix . $setting_id, array( 'section' => $section, 'type' => 'text', 'description' => sprintf( __( 'Want to remove the theme byline from your website’s footer? %s.', 'bgbn' ), sprintf( '%2$s', esc_url( bgbn_get_plus_link( 'white-label' ) ), sprintf( __( 'Upgrade to %1$s', 'bgbn' ), 'bgbn Plus' ) ) ), 'priority' => $priority->add() ) ) ); } } endif;