remove_section( 'colors' ); $panel_id = 'typography'; $wp_customize->add_panel( $panel_id, array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => 'Typography', 'description' => '', ) ); /****************** * // Subsets Section */ $section_id = 'typography_options'; $setting_id = $section_id . '_subsets'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Font Options', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'sanitize_callback' => 'themeoo_sanitize_font_subsets', ) ); $wp_customize->add_control( new Themeoo_Multiple_Checkbox_Control( $wp_customize, $setting_id, array( 'section' => $section_id, 'label' => __( 'Choose Google Font Subsets', 'ayyash' ), 'choices' => themeoo_get_choices( $setting_id ), ) ) ); /****************** * // Global Section */ $section_id = 'typography_global'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Global', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* Global */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Text', 'ayyash' ), '', true ); /****************** * // Headings Section */ $section_id = 'typography_heading'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Text Headings', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* H1 */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'H1', 'ayyash' ), 'h1' ); /* H2 */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'H2', 'ayyash' ), 'h2' ); /* H3 */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'H3', 'ayyash' ), 'h3' ); /* H4 */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'H4', 'ayyash' ), 'h4' ); /* H5 */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'H5', 'ayyash' ), 'h5' ); /* H6 */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'H6', 'ayyash' ), 'h6' ); /****************** * // Main Menu Section */ $section_id = 'typography_menu'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Main Menu', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* Menu Items */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Menu Items', 'ayyash' ), '', true, array( 'line_height' ) ); /* Sub Menu Items */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Sub Menu Items', 'ayyash' ), 'sub' ); /****************************** * // Site Title & Tagline Section */ $section_id = 'typography_site'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Site Title & Tagline', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* Site Title */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Site Title', 'ayyash' ), 'title' ); /* Site Tagline */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Site Tagline', 'ayyash' ), 'tagline' ); /****************************** * // Sidebar */ $section_id = 'typography_sidebar'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Sidebar', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* Site Title */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Widget Title', 'ayyash' ), 'title' ); /* Site Tagline */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Widget Body', 'ayyash' ), 'body' ); /****************************** * // Footer */ $section_id = 'typography_footer'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Footer', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); /* Widget Title */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Widget Title', 'ayyash' ), 'title' ); /* Widget Body */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Widget Body', 'ayyash' ), 'body' ); /* Secondary Footer */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Footer Text', 'ayyash' ), 'text' ); } }