add_setting( 'search-option', array( 'default' => 'true', 'type' => 'option', 'sanitize_callback' => 'arebee_sanitize_checkbox', ) ); // Add control and output for select field $wp_customize->add_control( 'search-option', array( 'label' => __( 'Search Option', 'arebee' ), 'section' => 'title_tagline', 'settings' => 'search-option', 'type' => 'checkbox', ) ); //Powered By // Add settings for output description $wp_customize->add_setting( 'poweredby-option', array( 'default' => 'true', 'type' => 'option', 'sanitize_callback' => 'arebee_sanitize_checkbox', ) ); // Add control and output for select field $wp_customize->add_control( 'poweredby-option', array( 'label' => __( 'Display Powered by?', 'arebee' ), 'section' => 'title_tagline', 'settings' => 'poweredby-option', 'type' => 'checkbox', ) ); //Widgets Bar // Add settings for output description $wp_customize->add_setting( 'sidebar-option', array( 'default' => 'false', 'type' => 'option', 'sanitize_callback' => 'arebee_sanitize_checkbox', ) ); // Add control and output for select field $wp_customize->add_control( 'sidebar-option', array( 'label' => __( 'Add sidebar to posts pages?', 'arebee' ), 'section' => 'title_tagline', 'settings' => 'sidebar-option', 'type' => 'checkbox', ) ); //Foreground Color Customizer $wp_customize->add_setting( 'foreground-color', array( 'default' => '#474747', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'foreground-color', array( 'label' => __('Foreground Color', 'arebee'), 'section' => 'colors', 'settings' => 'foreground-color' ) ) ); //Header Font Color Customizer $wp_customize->add_setting( 'headerfont-color', array( 'default' => '#FFFFFF', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'headerfont-color', array( 'label' => __('Header Font Color', 'arebee'), 'section' => 'colors', 'settings' => 'headerfont-color' ) ) ); //Title Background Color $wp_customize->add_setting( 'titlebackground-color', array( 'default' => '#636363', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'titlebackground-color', array( 'label' => __('Title Background Color', 'arebee'), 'section' => 'colors', 'settings' => 'titlebackground-color' ) ) ); //Follow US Customizer $wp_customize->add_section( 'followus_settings', array( 'title' => 'Follow Us Settings', 'description' => 'Enter in the URL for the corresponding social media sites. Blank entries will not be displayed.', 'priority' => 55, ) ); $wp_customize->add_setting( 'facebook_link', array( 'default' => '', 'sanitize_callback' => 'arebee_sanitize_text', ) ); $wp_customize->add_control( 'facebook_link', array( 'label' => 'Facebook Fan Page URL', 'section' => 'followus_settings', 'type' => 'text', ) ); $wp_customize->add_setting( 'twitter_link', array( 'default' => '', 'sanitize_callback' => 'arebee_sanitize_text', ) ); $wp_customize->add_control( 'twitter_link', array( 'label' => 'Twitter Page URL', 'section' => 'followus_settings', 'type' => 'text', ) ); $wp_customize->add_setting( 'linkedin_link', array( 'default' => '', 'sanitize_callback' => 'arebee_sanitize_text', ) ); $wp_customize->add_control( 'linkedin_link', array( 'label' => 'LinkedIn Page URL', 'section' => 'followus_settings', 'type' => 'text', ) ); } add_action( 'customize_register', 'arebee_customizer' ); /**************************************** * Sanitization Functions ****************************************/ function arebee_sanitize_checkbox( $input ) { if ( $input == 'true' ) { return 'true'; } else { return ''; } } function arebee_sanitize_text( $input ) { return wp_kses_post( force_balance_tags( $input ) ); } if ( ! function_exists( 'arebee_the_custom_logo' ) ) : function arebee_the_custom_logo() { if ( function_exists( 'the_custom_logo' ) ) { the_custom_logo(); } } endif; /**************************************** * Customizer CSS ****************************************/ function arebee_customize_css(){ ?>