add_setting( 'custom_typography_option', array( 'type' => 'theme_mod', * 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'custom_typography_option', array( 'label' => __( 'Typography Option', 'alphabet' ), 'type' => 'text', 'section' => 'custom_typography', )); */ $wp_customize->add_setting( 'custom_typography_gBodyFont', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'custom_typography_gBodyFont', array( 'label' => __( 'Google Body font Family', 'alphabet' ), 'type' => 'text', 'section' => 'custom_typography', )); $wp_customize->add_setting( 'custom_typography_gMenuFont', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'custom_typography_gMenuFont', array( 'label' => __( 'Google Menu font Family', 'alphabet' ), 'type' => 'text', 'section' => 'custom_typography', )); $wp_customize->add_setting( 'custom_typography_gHeadingFont', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'custom_typography_gHeadingFont', array( 'label' => __( 'Google Heading font Family', 'alphabet' ), 'type' => 'text', 'section' => 'custom_typography', )); $wp_customize->add_setting('custom_typography_bodyFontSize', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('custom_typography_bodyFontSize', array( 'label' => __('Body Font Size', 'alphabet' ), 'type' => 'select', 'section' => 'custom_typography', 'choices' => array( '10' => '10', '12' => '12', '14' => '14', '20' => '20', '25' => '25' ), //'selected' => '14', // ?? //'default' => '14', // ?? )); $wp_customize->add_setting('custom_typography_menuFontSize', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('custom_typography_menuFontSize', array( 'label' => __('Menu Font Size', 'alphabet' ), 'type' => 'select', 'section' => 'custom_typography', 'choices' => array( '16' => '16', '10' => '10', '12' => '12', '14' => '14', '20' => '20', '25' => '25' ), )); $wp_customize->add_setting('custom_typography_headingFontSizeH1', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('custom_typography_headingFontSizeH1', array( 'label' => __('Heading Font Size - H1', 'alphabet' ), 'type' => 'select', 'section' => 'custom_typography', 'choices' => array( '33' => '33', '10' => '10', '12' => '12', '14' => '14', '16' => '16', '20' => '20', '25' => '25' ), )); $wp_customize->add_setting('custom_typography_headingFontSizeH2', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('custom_typography_headingFontSizeH2', array( 'label' => __('Heading Font Size - H2', 'alphabet' ), 'type' => 'select', 'section' => 'custom_typography', 'choices' => array( '27' => '27', '10' => '10', '12' => '12', '14' => '14', '16' => '16', '20' => '20', '25' => '25', '33' => '33', ), )); $wp_customize->add_setting('custom_typography_headingFontSizeH3', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('custom_typography_headingFontSizeH3', array( 'label' => __('Heading Font Size - H3', 'alphabet' ), 'type' => 'select', 'section' => 'custom_typography', 'choices' => array( '25' => '25', '10' => '10', '12' => '12', '14' => '14', '16' => '16', '20' => '20', '27' => '27', '33' => '33', ), )); $wp_customize->add_section( 'custom_typography', array( 'title' => __( 'Typography', 'alphabet' ), 'description' => __( 'Add custom fonts here', 'alphabet' ), 'panel' => 'fonts_test', // Not typically needed. )); $description = '

Just test add_panel to Menus

'; $wp_customize->add_panel( 'fonts_test', array( 'title' => __( 'Fonts Test', 'alphabet' ), 'description' => __('Custom theme fonts', 'alphabet'), 'priority' => 160, // Mixed with top-level-section hierarchy. ) );