add_panel( 'basic_panel', array( 'title' => esc_html__('Theme Options', 'blog-way'), 'priority' => 90 ) ); // Header Section $wp_customize->add_section( 'header', array( 'title' => esc_html__('Header Options', 'blog-way'), 'panel' => 'basic_panel' ) ); $wp_customize->add_setting( 'sticky', array( 'default' => $default['sticky'], 'sanitize_callback' => 'blog_way_sanitize_checkbox' ) ); $wp_customize->add_control( 'sticky', array( 'label' => esc_html__('Disable Sticky Header', 'blog-way'), 'section' => 'header', 'settings' => 'sticky', 'type' => 'checkbox' ) ); // Post Options Section $wp_customize->add_section( 'post_options', array( 'title' => esc_html__('Post Options', 'blog-way'), 'panel' => 'basic_panel' ) ); $wp_customize->add_setting( 'excerpt_length', array( 'default' => $default['excerpt_length'], 'sanitize_callback' => 'blog_way_sanitize_positive_integer' ) ); $wp_customize->add_control( 'excerpt_length', array( 'label' => esc_html__('Excerpt Length', 'blog-way'), 'description' => esc_html__( 'Select number of words to display in excerpt', 'blog-way' ), 'section' => 'post_options', 'settings' => 'excerpt_length', 'type' => 'number', 'input_attrs' => array( 'min' => 20, 'max' => 220, 'step' => 1 ), ) ); // Setting global_layout. $wp_customize->add_setting( 'global_layout', array( 'default' => $default['global_layout'], 'sanitize_callback' => 'blog_way_sanitize_select', ) ); $wp_customize->add_control( 'global_layout', array( 'label' => esc_html__( 'Sidebar', 'blog-way' ), 'section' => 'post_options', 'type' => 'radio', 'choices' => array( 'left-sidebar' => esc_html__( 'Left Sidebar', 'blog-way' ), 'right-sidebar' => esc_html__( 'Right Sidebar', 'blog-way' ), 'no-sidebar' => esc_html__( 'No Sidebar', 'blog-way' ), ), ) ); // Header Section $wp_customize->add_section( 'footer', array( 'title' => esc_html__('Footer Options', 'blog-way'), 'panel' => 'basic_panel' ) ); $wp_customize->add_setting( 'copyright', array( 'default' => $default['copyright'], 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'copyright', array( 'label' => esc_html__('Copyright Text', 'blog-way'), 'description' => esc_html__('Copyright text of the site', 'blog-way'), 'settings' => 'copyright', 'section' => 'footer', 'type' => 'text' ) );