add_section( 'typography_settings', array( 'title' => esc_html__( 'Typography Options', 'alurra' ), 'priority' => 50, /* 'panel' => 'alurra_typography_options', */ ) ); /** Primary Font */ $wp_customize->add_setting( 'primary_font', array( 'default' => 'Merriweather', 'sanitize_callback' => 'alurra_sanitize_select' ) ); $wp_customize->add_control( new Alurra_Select_Control( $wp_customize, 'primary_font', array( 'label' => esc_html__( 'Primary Font', 'alurra' ), 'description' => esc_html__( 'Primary font for your website main content.', 'alurra' ), 'section' => 'typography_settings', 'choices' => alurra_get_all_fonts(), ) ) ); /** Secondary Font */ $wp_customize->add_setting( 'secondary_font', array( 'default' => 'Playfair Display', 'sanitize_callback' => 'alurra_sanitize_select' ) ); $wp_customize->add_control( new Alurra_Select_Control( $wp_customize, 'secondary_font', array( 'label' => esc_html__( 'Secondary Font', 'alurra' ), 'description' => esc_html__( 'Secondary font for your page headings and titles.', 'alurra' ), 'section' => 'typography_settings', 'choices' => alurra_get_all_fonts(), ) ) ); /** Font Size*/ $wp_customize->add_setting( 'font_size', array( 'default' => 16, 'sanitize_callback' => 'alurra_sanitize_number_absint' ) ); $wp_customize->add_control( new Alurra_Slider_Control( $wp_customize, 'font_size', array( 'section' => 'typography_settings', 'label' => esc_html__( 'Font Size', 'alurra' ), 'description' => esc_html__( 'Change the font size of your site.', 'alurra' ), 'choices' => array( 'min' => 10, 'max' => 50, 'step' => 1, ) ) ) ); } add_action( 'customize_register', 'alurra_customize_register_typography' );