'theme_mod', * 'capability' => 'edit_theme_options' * 'default' => 0, * 'transport' => 'refresh', * 'sanitize_callback' => 'some_function' */ /*=============================================== = Top Header Bar Switcher = ===============================================*/ $rws_business_options = 'rws_business_options'; $wp_customize->add_setting( 'rws_business_options[top_header_display_bar]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => $rws_business_options_defaults['top_header_display_bar'], 'transport' => 'refresh', 'sanitize_callback' => 'rws_business_sanitize_checkbox' ) ); $wp_customize->add_control( new Customize_Switcher_Control( $wp_customize, 'rws_business_options[top_header_display_bar]', array( 'label' => __( 'Display Top Header Bar', 'business-hub' ), 'section' => 'top_header_section', 'setting' => 'rws_business_options[top_header_display_bar]', 'priority' => 1 ) ) ); $wp_customize->add_setting( 'rws_business_options[top_header_text]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => $rws_business_options_defaults['top_header_text'], 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'rws_business_options[top_header_text]', array( 'label' => __('Top Header Left Side Text', 'business-hub' ), 'section' => 'top_header_section', 'setting' => 'rws_business_options[top_header_text]', 'type' => 'select', 'choices' => array( 'tagline' => 'Tagline', 'custom' => 'Custom Text', 'title' => 'Site Title', 'title-tagline' => 'Title And Tagline' ) ) ); $wp_customize->add_setting( 'rws_business_options[top_header_text_custom]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => $rws_business_options_defaults['top_header_text_custom'], 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'rws_business_options[top_header_text_custom]', array( 'label' => __('Top Header Left Side Custom Text', 'business-hub' ), 'section' => 'top_header_section', 'setting' => 'rws_business_options[top_header_text_custom]', 'type' => 'text', 'active_callback' => 'rws_business_top_header', ) ); $wp_customize->add_setting( 'rws_business_options[top_header_display_social]', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => $rws_business_options_defaults['top_header_display_social'], 'transport' => 'refresh', 'sanitize_callback' => 'rws_business_sanitize_checkbox' ) ); $wp_customize->add_control( new Customize_Switcher_Control( $wp_customize, 'rws_business_options[top_header_display_social]', array( 'label' => __( 'Display Social Icons', 'business-hub' ), 'section' => 'top_header_section', 'setting' => 'rws_business_options[top_header_display_social]', 'description' => __( 'For Social Menu Use Activate Social Menu From Menu Section', 'business-hub' ), 'priority' => 2 ) ) ); /*===== End of Top Header Bar Switcher ======*/