add_setting('logo_header_position', array( 'type' => 'option', 'default' => 'skin1', // 'transport' => 'refresh', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('logo_header_position', array( 'label' => __('Select Header Template', 'alphabet' ), 'type' => 'radio', 'section' => 'header_general', 'choices' => array( 'skin1' => 'Skin 1', 'skin2' => 'Skin 2', ), 'description' => __('Header Skin', 'alphabet'), )); //add_option( 'show_header_login', '1' ); // Enable/Disable Login (in TO checkbox field; in DB: '1' | '') // -> transform to serialized in: alphabet_theme_options: "checkbox_show_header_login";b:1 // Allow site visitors to login on your site // ============================= // = Checkbox: show_header_login = // ============================= $wp_customize->add_setting('alphabet_theme_options[checkbox_show_header_login]', array( 'capability' => 'edit_theme_options', 'type' => 'option', 'default' => true, // d: ? answ: not declared, in Live Preview Page: string(0) "" //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('show_header_login', array( 'label' => __('Enable/Disable Login', 'alphabet'), 'type' => 'checkbox', 'settings' => 'alphabet_theme_options[checkbox_show_header_login]', 'section' => 'header_general', 'description' => __('Allow site visitors to see login link on your site', 'alphabet'), )); //add_option( 'show_header_first', 'Yes' ); //Enable/Disable top bar //Choose this option to show Topbar // ============================= // = Checkbox: show_header_first = // ============================= $wp_customize->add_setting('alphabet_theme_options[checkbox_show_header_first]', array( 'type' => 'option', 'default' => true, // d: true ? answ: not declared, in Live Preview Page: string(0) "" 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('show_header_first', array( 'label' => __('Enable/Disable top bar', 'alphabet'), 'type' => 'checkbox', 'settings' => 'alphabet_theme_options[checkbox_show_header_first]', 'section' => 'header_topbar', 'description' => __('Choose this option to show Topbar', 'alphabet'), )); //add_option( 'top_sdb_background', '#edf1f2' ); // Top sidebar background $wp_customize->add_setting( 'top_sdb_background', array( 'type' => 'option', 'default' => 'edf1f2', //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'top_sdb_background', array( 'label' => __( 'Top sidebar background', 'alphabet' ), 'section' => 'header_topbar', ))); //add_option( 'top_txt_color', '#677b87' ); // Text color $wp_customize->add_setting( 'top_txt_color', array( 'type' => 'option', 'default' => '677b87', //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'top_txt_color', array( 'label' => __( 'Text color', 'alphabet' ), 'section' => 'header_topbar', ))); //add_option( 'logo_sdb_padding', '10' ); // Top sidebar vertical padding, px $wp_customize->add_setting( 'logo_sdb_padding', array( 'type' => 'option', 'default' => '10', //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'logo_sdb_padding', array( 'label' => __( 'Top sidebar vertical padding, px', 'alphabet' ), 'type' => 'text', 'section' => 'header_topbar', )); /** * To section: 'header_titlebar' - 'Page title bar' */ //add_option( 'line_title_backcolor', '#edf1f2' ); // Background color // // not implemented in TO //add_option( 'line_title_textcolor', '#000000' ); // Text color // // not implemented in TO //add_option( 'animation_line_title', '' ); //Animation (in TO: select field; in DB: '' | 'bounce' | 'flash' | 'someEffect' ) $wp_customize->add_setting('animation_line_title', array( 'type' => 'option', 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); global $alphabet_animationlist; $wp_customize->add_control('animation_line_title', array( 'label' => __('Animation', 'alphabet' ), 'type' => 'select', 'section' => 'header_titlebar', 'choices' => $alphabet_animationlist, 'description' => __('Select type of animation', 'alphabet'), )); // add_option( 'delay_line_title', '' ); // Animation delay (in TO: select field; in DB: '' | 'delay-0_5s' | 'delay-1_0s' | 'delay-...') // Set animation delay, seconds $wp_customize->add_setting('delay_line_title', array( 'type' => 'option', 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); global $alphabet_animationdelay; $wp_customize->add_control('delay_line_title', array( 'label' => __('Animation delay', 'alphabet' ), 'type' => 'select', 'section' => 'header_titlebar', 'choices' => $alphabet_animationdelay, 'description' => __('Set animation delay, seconds', 'alphabet'), )); /** * To section: 'header_breadcrumbs' */ //add_option( 'show_brealcrums_line', 'show' ); // Enable Breadcrumbs (in TO: checkbox, in DB: 'show' | '') // Choose this option to show Breadcrumbs // implement with SELECT: $wp_customize->add_setting('show_brealcrums_line', array( 'type' => 'option', //'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('show_brealcrums_line', array( 'label' => __('Enable Breadcrumbs', 'alphabet' ), 'type' => 'select', 'section' => 'header_breadcrumbs', 'choices' => array( 'show' => 'show', 'no' => 'NONE', ), 'description' => __('Select this option to show Breadcrumbs', 'alphabet'), )); //add_option( 'breadcrums_a_color', '#3bc0c3' ); // Link color $wp_customize->add_setting( 'breadcrums_a_color', array( 'type' => 'option', 'default' => '3bc0c3', //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'breadcrums_a_color', array( 'label' => __( 'Link color', 'alphabet' ), 'section' => 'header_breadcrumbs', ))); //add_option( 'breadcrums_ahover_color', '#000000' ); // Link hover color $wp_customize->add_setting( 'breadcrums_ahover_color', array( 'type' => 'option', 'default' => '000000', //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'breadcrums_ahover_color', array( 'label' => __( 'Link hover color', 'alphabet' ), 'section' => 'header_breadcrumbs', ))); //add_option( 'breadcrums_ccurrent', '#9caab3' ); // Choosen page color $wp_customize->add_setting( 'breadcrums_ccurrent', array( 'type' => 'option', 'default' => '9caab3', //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'breadcrums_ccurrent', array( 'label' => __( 'Choosen page color', 'alphabet' ), 'section' => 'header_breadcrumbs', ))); //add_option( 'breadcrums_text', '#9caab3' ); // Other text color $wp_customize->add_setting( 'breadcrums_text', array( 'type' => 'option', 'default' => '9caab3', //'transport' => 'postMessage', // d: 'refresh' | 'postMessage' 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'breadcrums_text', array( 'label' => __( 'Other text color', 'alphabet' ), 'section' => 'header_breadcrumbs', ))); //add_option( 'animation_breadcrumbs', '' ); //Animation (in TO: select field; in DB: '' | 'bounce' | 'flash' | 'someEffect' ) $wp_customize->add_setting('animation_breadcrumbs', array( 'type' => 'option', 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('animation_breadcrumbs', array( 'label' => __('Animation', 'alphabet' ), 'type' => 'select', 'section' => 'header_breadcrumbs', 'choices' => $alphabet_animationlist, 'description' => __('Select type of animation', 'alphabet'), )); // add_option( 'delay_breadcrumbs', '' ); // Animation delay (in TO: select field; in DB: '' | 'delay-0_5s' | 'delay-1_0s' | 'delay-...') // Set animation delay, seconds $wp_customize->add_setting('delay_breadcrumbs', array( 'type' => 'option', 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('delay_breadcrumbs', array( 'label' => __('Animation delay', 'alphabet' ), 'type' => 'select', 'section' => 'header_breadcrumbs', 'choices' => $alphabet_animationdelay, 'description' => __('Set animation delay, seconds', 'alphabet'), )); // Add a 'General' section. $wp_customize->add_section( 'header_general' , array( 'title' => __( 'General', 'alphabet' ), 'priority' => 85, // Before Footer, Navigation. 'panel' => 'header', // Not typically needed. )); // Add a 'Top Panel / Top Bar' section. $wp_customize->add_section( 'header_topbar' , array( 'title' => __( 'Top Panel / Top Bar', 'alphabet' ), 'description' => __('
Custom options: Top Panel / Top Bar
', 'alphabet'), 'panel' => 'header', )); // Add a 'Page title bar' section. $wp_customize->add_section( 'header_titlebar' , array( 'title' => __( 'Page title bar', 'alphabet' ), 'description' => __('Custom options: Page title bar
', 'alphabet'), 'panel' => 'header', )); // Add a 'Breadcrumbs' section. $wp_customize->add_section( 'header_breadcrumbs' , array( 'title' => __( 'Breadcrumbs', 'alphabet' ), 'description' => __('Custom options: Breadcrumbs
', 'alphabet'), 'panel' => 'header', )); $wp_customize->add_panel( 'header', array( 'title' => __( 'Header', 'alphabet' ), 'description' => __('Custom options', 'alphabet'), // Include html tags such as. 'priority' => 85, // Before Footer, Navigation. // Mixed with top-level-section hierarchy. ) );