remove_section( 'colors' ); $wp_customize->add_panel( self::PANEL_ID, array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Typography', 'ayyash' ), 'description' => '', ) ); self::typography_options( $wp_customize ); self::typography_global( $wp_customize ); self::typography_heading( $wp_customize ); self::typography_menu( $wp_customize ); self::typography_site( $wp_customize ); self::typography_sidebar( $wp_customize ); self::typography_footer( $wp_customize ); } protected static function typography_options( $wp_customize ) { $section_id = 'typography_options'; $setting_id = 'typography_options_subsets'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Font Options', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => self::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 ), ) ) ); } protected static function typography_global( $wp_customize ) { $section_id = 'typography_global'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Global', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => self::PANEL_ID, ) ); /* Global */ themeoo_generate_font_control( $wp_customize, $section_id, __( 'Text', 'ayyash' ), '', true ); } protected static function typography_heading( $wp_customize ) { $section_id = 'typography_heading'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Text Headings', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => self::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' ); } protected static function typography_menu( $wp_customize ) { $section_id = 'typography_menu'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Main Menu', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => self::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' ); } protected static function typography_site( $wp_customize ) { $section_id = 'typography_site'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Site Title & Tagline', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => self::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' ); } protected static function typography_sidebar( $wp_customize ) { $section_id = 'typography_sidebar'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Sidebar', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => self::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' ); } protected static function typography_footer( $wp_customize ) { $section_id = 'typography_footer'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Footer', 'ayyash' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => self::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' ); } }