add_panel( $panel_id, array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => 'Layout', ) ); /******************* * // Global Section */ $section_id = 'layout_global'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Global', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); // Site Layout $setting_id = $section_id . '_site'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Site Layout', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Site Layout $setting_id = $section_id . '_content_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Container Layout', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_content_layout_min_width'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Container Min Width', 'ayyash' ), 'description' => __( 'Min width applicable only container case for Container Layout', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); $setting_id = $section_id . '_content_layout_max_width'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Container Max Width', 'ayyash' ), 'description' => __( 'Max width applicable only container-fluid case for Container Layout', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); // Content Width $setting_id = $section_id . '_content_grid'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Content Width', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Sidebar Width $setting_id = $section_id . '_sidebar_grid'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Width', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); /****************** * // Header Section */ $section_id = 'layout_header'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Header', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* ---------------------------------------------------------------------- * Topbar/ Secondary header *----------------------------------------------------------------------*/ $setting_id = $section_id . '_top_bar_section_separator'; $wp_customize->add_setting( $setting_id, array( 'type' => 'helptext', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'label' => __( 'Top Bar / Secondary Header Settings', 'ayyash' ), 'section' => $section_id, 'type' => 'helptext', 'description' => __( 'Change Top Bar / Secondary header Related Settings', 'ayyash' ), ) ) ); // Show Secondary Header $setting_id = $section_id . '_secondary'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Secondary Header', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Secondary Header Layout $setting_id = $section_id . '_secondary_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Secondary Header Layout', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Header Callout Text $setting_id = $section_id . '_callout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new Themeoo_Textarea_Control( $wp_customize, $setting_id, array( 'label' => __( 'Secondary Header Callout Text', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); /* ---------------------------------------------------------------------- * End of secondary header *----------------------------------------------------------------------*/ /* ---------------------------------------------------------------------- * Start Main Header and Menu Configuration *----------------------------------------------------------------------*/ $setting_id = $section_id . '_header_section_separator'; $wp_customize->add_setting( $setting_id, array( 'type' => 'helptext', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'label' => __( 'Header and Menu Settings', 'ayyash' ), 'section' => $section_id, 'type' => 'helptext', 'description' => __( 'Change Header settings and related configuration', 'ayyash' ), ) ) ); // Header Height $setting_id = $section_id . '_height'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Header Height', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Logo Right Space $setting_id = $section_id . '_logo_right_space'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Logo Right Padding', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Menu Top Pading $setting_id = $section_id . '_menu_top_padding'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Menu Top Padding', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Main Menu Height $setting_id = $section_id . '_menu_height'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Main Menu Height', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Mobile Menu show grid section $setting_id = $section_id . '_menu_mobileshow'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Mobile Menu / Hide Main Menu', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Main Menu Alignment $setting_id = $section_id . '_menu_alignment'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Main Menu Alignment', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Main Submenu Alignment $setting_id = $section_id . '_submenu_alignment'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Main Submenu Alignment', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Submenu Width $setting_id = $section_id . '_submenu_width'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Submenu Width', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Submenu Top Bottom Padding $setting_id = $section_id . '_submenu_tb_padding'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Submenu Top Bottom Padding', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Submenu Left Right Padding $setting_id = $section_id . '_submenu_lr_padding'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Submenu Left Right Padding', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Show Search Icon $setting_id = $section_id . '_search'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Search Icon', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Sho Mini Cart $setting_id = $section_id . '_show_mini_cart'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Mincart at Menu', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); /* ---------------------------------------------------------------------- * Stickey Settings *----------------------------------------------------------------------*/ // Stickey Section Separator $setting_id = $section_id . '_header_stickey_section_separator'; $wp_customize->add_setting( $setting_id, array( 'type' => 'helptext', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'label' => __( 'Stickey Header Settings', 'ayyash' ), 'section' => $section_id, 'type' => 'helptext', 'description' => __( 'Change stickey header related settings', 'ayyash' ), ) ) ); // Enable Sticky Header $setting_id = $section_id . '_sticky'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Enable Sticky Header', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Sticky Header Height $setting_id = $section_id . '_sticky_height'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sticky Header Height', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Stickey Menu Top Pading $setting_id = $section_id . '_sticky_menu_top_padding'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sticky Menu Top Padding', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Stickey Main Menu Height $setting_id = $section_id . '_sticky_menu_height'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Themeoo_Customizer_Range_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sticky Main Menu Height', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'choices' => themeoo_get_choices( $setting_id ), ) ) ); /* ---------------------------------------------------------------------- * End of header Settings *----------------------------------------------------------------------*/ /****************** * // Title Bar Section */ $section_id = 'title_bar'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Title Bar', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* ---------------------------------------------------------------------- * Title Bar Settings *----------------------------------------------------------------------*/ $setting_id = $section_id . '_h2'; $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'heading', 'label' => __( 'Title Container', 'ayyash' ), ) ) ); $setting_id = $section_id . '_title_container'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, $setting_id, array( 'label' => __( 'Background Image', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); /****************************************** * // Blog (Posts Page) Section */ $section_id = 'layout_blog'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Blog (Posts Page)', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_style'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Style', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_excerpt_length'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Excerpt Length', 'ayyash' ), 'description' => __( 'Number or word you want to show on archive content', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); $setting_id = $section_id . '_meta'; $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'heading', 'label' => __( 'Post Meta', 'ayyash' ), ) ) ); $setting_id = $section_id . '_meta-cats'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Categories', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); $setting_id = $section_id . '_meta-tags'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Tags', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); if ( themeoo_is_plugin_active( 'regenerate-thumbnails' ) ) { $desc = sprintf( /* translators: %s: Regenerate Thumbnail Plugin Page Link */ __( 'After changing any of the post thumbnail sizes please use Regenerate Thumbnail plugin to resize (regenerate) thumbnails.', 'ayyash' ), esc_url( admin_url( 'tools.php?page=regenerate-thumbnails' ) ) ); } else { $desc = sprintf( /* translators: %s: Regenerate Thumbnail Plugin Installation Link */ __( 'After changing any of the post thumbnail sizes please install and use Regenerate Thumbnail plugin to resize (regenerate) thumbnails.', 'ayyash' ), admin_url( 'themes.php?page=tgmpa-install-plugins&plugin_status=install' ) ); } $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'helptext', 'label' => __( 'Post Thumbnail Sizes', 'ayyash' ), 'description' => $desc, ) ) ); $setting_id = $section_id . '_normal_image'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Blog Normal Image Size', 'ayyash' ), 'description' => __( 'Single Blog / Blog Normal Layout Image Size ( width,height )', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); $setting_id = $section_id . '_medium_image'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Blog Medium Image Size', 'ayyash' ), 'description' => __( 'Blog Medium Layout Image Size ( width,height ).', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); $setting_id = $section_id . '_grid_image'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Blog Grid Image Size', 'ayyash' ), 'description' => __( 'Blog Grid layout Image Size ( width,height )', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); /****************************************** * // Archives Section */ $section_id = 'layout_archive'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Archives', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_style'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Style', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_meta'; $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'heading', 'label' => __( 'Post Meta', 'ayyash' ), ) ) ); $setting_id = $section_id . '_meta-cats'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Categories', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); $setting_id = $section_id . '_meta-tags'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Tags', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); /****************************************** * // Search Results Section */ $section_id = 'layout_search'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Search Results', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_style'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Style', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_meta'; $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'heading', 'label' => __( 'Post Meta', 'ayyash' ), ) ) ); $setting_id = $section_id . '_meta-cats'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Categories', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); $setting_id = $section_id . '_meta-tags'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Tags', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); /****************************************** * // Single Post */ $section_id = 'layout_post'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Single Post', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_ft-img-hide'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Hide Featured Image', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); $setting_id = $section_id . '_ft-img-enlarge'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Enlarge Featured Image', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', 'description' => __( 'Enalrge the featured image width to the 100% width of the view port/window', 'ayyash' ), ) ) ); $setting_id = $section_id . '_content_align'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Content Alignment', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_title'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Post Title ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_meta'; $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'heading', 'label' => __( 'Post Meta', 'ayyash' ), ) ) ); $setting_id = $section_id . '_meta-cats'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Categories', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); $setting_id = $section_id . '_meta-tags'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Tags', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); /****************************************** * // Single Page */ $section_id = 'layout_page'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Single Page', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_ft-img-hide'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Hide Featured Image', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); $setting_id = $section_id . '_ft-img-enlarge'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Enlarge Featured Image', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', 'description' => __( 'Enalrge the featured image width to the 100% width of the view port/window', 'ayyash' ), ) ) ); $setting_id = $section_id . '_content_align'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Content Alignment', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_title'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Page Title ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); /* ---------------------------------------------------------------------- * End Of Single Page *----------------------------------------------------------------------*/ /************************* * // Footer Top Section */ $section_id = 'footer_top'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Footer Top', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* ---------------------------------------------------------------------- * Footer Top Settings *----------------------------------------------------------------------*/ $setting_id = $section_id . '_h2'; $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'heading', 'label' => __( 'Footer Container', 'ayyash' ), ) ) ); $setting_id = $section_id . '_bg_img'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, $setting_id, array( 'label' => __( 'Background Image', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); /****************** * // Footer Section */ $section_id = 'layout_footer'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Footer', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_settings'; $wp_customize->add_control( new Themeoo_Customize_Misc_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'type' => 'heading', 'label' => __( 'Footer Settings', 'ayyash' ), ) ) ); $setting_id = $section_id . '_social'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Social Icons', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Footer copyright Text. $setting_id = $section_id . '_footer_text'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( new Themeoo_Textarea_Control( $wp_customize, $setting_id, array( 'label' => __( 'Footer Copyright Text', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); } }