transform to serialized in: alphabet_theme_options: "checkbox_show_ajax_load";b:0 | 1 // Enable to download content without additional page reloading // ============================= // = Checkbox: show_ajax_load = // ============================= $wp_customize->add_setting('alphabet_theme_options[checkbox_show_ajax_load]', array( 'type' => 'option', 'default' => false, // d: not declared, in Live Preview Page: string(0) "" 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('show_ajax_load', array( 'label' => __('Enable/Disable AJAX menu', 'alphabet'), 'type' => 'checkbox', 'settings' => 'alphabet_theme_options[checkbox_show_ajax_load]', 'section' => 'menu_general', 'description' => __('Enable to download content without additional page reloading', 'alphabet'), )); //add_option( 'menu_ontop_preloader', '' ); // Top menu at Preloading Page (in TO checkbox field; in DB: '' | 'header-up-preloader') // -> transform to serialized in: alphabet_theme_options: "checkbox_menu_ontop_preloader";b:0 | 1 // Enable menu at the top of Preloading Page // This feature work with enabled Preloader. Menu stay top while page reloading. // ============================= // = Checkbox: menu_ontop_preloader = // ============================= $wp_customize->add_setting('alphabet_theme_options[checkbox_menu_ontop_preloader]', array( 'type' => 'option', 'default' => false, // d: not declared, in Live Preview Page: string(0) "" 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('menu_ontop_preloader', array( 'label' => __('Top menu at Preloading Page', 'alphabet'), 'type' => 'checkbox', 'settings' => 'alphabet_theme_options[checkbox_menu_ontop_preloader]', 'section' => 'menu_general', 'description' => __('Enable menu at the top of Preloading Page (select Preloader Template first)', 'alphabet'), )); //add_option( 'menu_fixed', '' ); // Menu sticky (in TO checkbox field; in DB: '' | 'header-fixed') // -> transform to serialized in: alphabet_theme_options: "checkbox_menu_fixed";b:0 | 1 // Check to fixed menu when scrolling // ============================= // = Checkbox: menu_fixed = // ============================= $wp_customize->add_setting('alphabet_theme_options[checkbox_menu_fixed]', array( 'type' => 'option', 'default' => false, // d: not declared, in Live Preview Page: string(0) "" 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('menu_fixed', array( 'label' => __('Menu sticky', 'alphabet'), 'type' => 'checkbox', 'settings' => 'alphabet_theme_options[checkbox_menu_fixed]', 'section' => 'menu_general', 'description' => __('Check to fixed menu when scrolling', 'alphabet'), )); // add_option( 'animation_for_menu', '' ); //Animation menu (in TO: select field; in DB: '' | 'bounce' | 'flash' | 'someEffect' ) $wp_customize->add_setting('animation_for_menu', array( 'type' => 'option', 'default' => '', // how it's work in selects? 'sanitize_callback' => 'sanitize_text_field', )); global $alphabet_animationlist; $wp_customize->add_control('animation_for_menu', array( 'label' => __('Animation menu', 'alphabet' ), 'type' => 'select', 'section' => 'menu_general', 'choices' => $alphabet_animationlist, 'description' => __('Select type of animation', 'alphabet'), )); //add_option( 'delay_for_menu', '' ); // Animation delay (in TO: select field; in DB: '' | 'delay-0_5s' | 'delay-1_0s' | 'delay-...') // Set animation delay, seconds $wp_customize->add_setting('delay_for_menu', array( 'type' => 'option', 'default' => '', 'sanitize_callback' => 'sanitize_text_field', )); global $alphabet_animationdelay; $wp_customize->add_control('delay_for_menu', array( 'label' => __('Animation delay', 'alphabet' ), 'type' => 'select', 'section' => 'menu_general', 'choices' => $alphabet_animationdelay, 'description' => __('Set animation delay, seconds', 'alphabet'), )); /** * To section: 'menu_firstLevelMenu' * * 1 lvl Menu */ //add_option( 'menu_background', '#ffffff' ); // Menu background $wp_customize->add_setting( 'menu_background', array( 'type' => 'option', 'default' => 'ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_background', array( 'label' => __( 'Menu background', 'alphabet' ), 'section' => 'menu_firstLevelMenu', ))); //add_option( 'menu_background_hover', '#edf1f2' ); // Menu background (Hover) $wp_customize->add_setting( 'menu_background_hover', array( 'type' => 'option', 'default' => 'edf1f2', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_background_hover', array( 'label' => __( 'Menu background (Hover)', 'alphabet' ), 'section' => 'menu_firstLevelMenu', ))); //add_option( 'menu_text_color', '#7f8f99' ); // Text color $wp_customize->add_setting( 'menu_text_color', array( 'type' => 'option', 'default' => '7f8f99', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_text_color', array( 'label' => __( 'Text color', 'alphabet' ), 'section' => 'menu_firstLevelMenu', ))); //add_option( 'menu_text_color_hover', '#39c1c3' ); // Text color (Hover) $wp_customize->add_setting( 'menu_text_color_hover', array( 'type' => 'option', 'default' => '39c1c3', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_text_color_hover', array( 'label' => __( 'Text color (Hover)', 'alphabet' ), 'section' => 'menu_firstLevelMenu', ))); //add_option( 'menu_text_color_current', '#7f8f99' ); // Selected menu item text color $wp_customize->add_setting( 'menu_text_color_current', array( 'type' => 'option', 'default' => '7f8f99', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_text_color_current', array( 'label' => __( 'Selected menu item text color', 'alphabet' ), 'section' => 'menu_firstLevelMenu', ))); //add_option( 'menu_border_color_current', '#39c1c3' ); // Selected menu item border color $wp_customize->add_setting( 'menu_border_color_current', array( 'type' => 'option', 'default' => '39c1c3', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_border_color_current', array( 'label' => __( 'Selected menu item border color', 'alphabet' ), 'section' => 'menu_firstLevelMenu', ))); /** * To section: 'menu_subLevelMenu' */ //add_option( 'sub_menu_background', '#edf1f2' ); $wp_customize->add_setting( 'sub_menu_background', array( 'type' => 'option', 'default' => 'edf1f2', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sub_menu_background', array( 'label' => __( 'Menu background', 'alphabet' ), 'section' => 'menu_subLevelMenu', ))); //add_option( 'sub_menu_background_hover', '#39c1c3' ); $wp_customize->add_setting( 'sub_menu_background_hover', array( 'type' => 'option', 'default' => '39c1c3', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sub_menu_background_hover', array( 'label' => __( 'Menu background (Hover)', 'alphabet' ), 'section' => 'menu_subLevelMenu', ))); //add_option( 'sub_menu_text_color', '#a1b1bc' ); $wp_customize->add_setting( 'sub_menu_text_color', array( 'type' => 'option', 'default' => 'a1b1bc', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sub_menu_text_color', array( 'label' => __( 'Text color', 'alphabet' ), 'section' => 'menu_subLevelMenu', ))); //add_option( 'sub_menu_text_color_hover', '#ffffff' ); $wp_customize->add_setting( 'sub_menu_text_color_hover', array( 'type' => 'option', 'default' => 'ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sub_menu_text_color_hover', array( 'label' => __( 'Text color (Hover)', 'alphabet' ), 'section' => 'menu_subLevelMenu', ))); //add_option( 'sub_menu_text_color_current', '#ffffff' ); $wp_customize->add_setting( 'sub_menu_text_color_current', array( 'type' => 'option', 'default' => 'ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sub_menu_text_color_current', array( 'label' => __( 'Current menu text color', 'alphabet' ), 'section' => 'menu_subLevelMenu', ))); //add_option( 'sub_menu_border_color_current', '#39c1c3' ); $wp_customize->add_setting( 'sub_menu_border_color_current', array( 'type' => 'option', 'default' => '39c1c3', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sub_menu_border_color_current', array( 'label' => __( 'Current menu border color', 'alphabet' ), 'section' => 'menu_subLevelMenu', ))); // add_option( 'show_border_menu', 'yes' ); // Show border (in TO checkbox field; in DB: 'yes' | '') // -> transform to serialized in: alphabet_theme_options: "checkbox_show_border_menu";b:1 | 0 // '' // ============================= // = Checkbox: show_border_menu = // ============================= $wp_customize->add_setting('alphabet_theme_options[checkbox_show_border_menu]', array( 'type' => 'option', 'default' => true, // d: not declared, in Live Preview Page: string(0) "" 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('show_border_menu', array( 'label' => __('Show border', 'alphabet'), 'type' => 'checkbox', 'settings' => 'alphabet_theme_options[checkbox_show_border_menu]', 'section' => 'menu_subLevelMenu', )); /** * To section: 'menu_padding' */ //add_option( 'menu_border_color_full', '#edf1f2' ); // Full width menu border color $wp_customize->add_setting( 'menu_border_color_full', array( 'type' => 'option', 'default' => 'edf1f2', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_border_color_full', array( 'label' => __( 'Full width menu border color', 'alphabet' ), 'section' => 'menu_padding', ))); //add_option( 'border_width_skin_1', '0' ); //Border thickness skin 1 $wp_customize->add_setting( 'border_width_skin_1', array( 'type' => 'option', 'default' => '0', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'border_width_skin_1', array( 'label' => __( 'Border thickness skin 1, px', 'alphabet' ), 'type' => 'text', 'section' => 'menu_padding', )); //add_option( 'border_width_skin_2', '1' ); //Border thickness skin 2 $wp_customize->add_setting( 'border_width_skin_2', array( 'type' => 'option', 'default' => '1', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'border_width_skin_2', array( 'label' => __( 'Border thickness skin 2, px', 'alphabet' ), 'type' => 'text', 'section' => 'menu_padding', )); //add_option( 'logo_vertical_padding', '18' ); // Logo vertical padding $wp_customize->add_setting( 'logo_vertical_padding', array( 'type' => 'option', 'default' => '18', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'logo_vertical_padding', array( 'label' => __( 'Logo vertical padding, px', 'alphabet' ), 'type' => 'text', 'section' => 'menu_padding', )); //add_option( 'menu_vertical_padding', '0' ); // Menu vertical padding $wp_customize->add_setting( 'menu_vertical_padding', array( 'type' => 'option', 'default' => '0', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'menu_vertical_padding', array( 'label' => __( 'Menu vertical padding, px', 'alphabet' ), 'type' => 'text', 'section' => 'menu_padding', )); // Add a 'General' section. $wp_customize->add_section( 'menu_general' , array( 'title' => __( 'General', 'alphabet' ), 'panel' => 'menu', )); // Add a '1 lvl Menu' section. $wp_customize->add_section( 'menu_firstLevelMenu' , array( 'title' => __( '1 lvl Menu', 'alphabet' ), 'description' => __('
Custom options: First Level Menu
', 'alphabet'), 'panel' => 'menu', )); // Add a 'Sub Menu lvl' section. $wp_customize->add_section( 'menu_subLevelMenu' , array( 'title' => __( 'Sub Menu lvl', 'alphabet' ), 'description' => __('Custom options: Sub Menu Level
', 'alphabet'), 'panel' => 'menu', )); // Add a 'Padding' section. $wp_customize->add_section( 'menu_padding' , array( 'title' => __( 'Padding', 'alphabet' ), 'description' => __('Custom options: Menu Paddings
', 'alphabet'), 'panel' => 'menu', )); $wp_customize->add_panel( 'menu', array( 'title' => __( 'Menu Styles', 'alphabet' ), 'description' => __('Custom options for menu styles', 'alphabet'), // Include html tags such as. 'priority' => 95, // Mixed with top-level-section hierarchy. ) );