add_section( 'font_section', array( 'title' => __( 'Fonts', 'pliska' ), 'description' => __( 'Choose between 1000+ google fonts', 'pliska' ), ) ); $wp_customize->add_setting( 'headings_fontfamily', array( 'default' => 'Rubik', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'headings_fontfamily', array( 'label' => __( 'Headings Font Family', 'pliska' ), 'section' => 'font_section', 'type' => 'select', 'choices' => pliska_font_family(), 'description' => esc_html__( 'Choose font for the headlines.', 'pliska' ), ) ); $wp_customize->add_setting( 'body_fontfamily', array( 'default' => 'IBM Plex Sans', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'body_fontfamily', array( 'label' => __( 'Body Font Family', 'pliska' ), 'section' => 'font_section', 'type' => 'select', 'choices' => pliska_font_family(), 'description' => esc_html__( 'Choose font for the text.', 'pliska' ), ) ); /* Regulate body size */ $wp_customize->add_setting( 'body_font_size', array( 'default' => '16', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'body_font_size', array( 'label' => __( 'Body Font Size', 'pliska' ), 'section' => 'font_section', 'type' => 'number', 'input_attrs' => array( 'min' => 8, 'max' => 30, 'step' => 1, ), 'description' => esc_html__( 'Change the size of the text. Enter a number in pixels between 8 and 30. Default is 16.', 'pliska' ), ) ); return; $wp_customize->add_setting( 'site_title_font_size', array( 'default' => '28', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'site_title_font_size', array( 'label' => __( 'Site Title Font size', 'pliska' ), 'section' => 'font_section', 'type' => 'number', 'input_attrs' => array( 'min' => 20, 'max' => 36, 'step' => 1, ), 'description' => esc_html__( 'Change the size of the Site Title. Enter a number in pixels between 20 and 36. Default is 28.', 'pliska' ), ) ); $wp_customize->add_setting( 'heading_one_font_size', array( 'default' => '36', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'heading_one_font_size', array( 'label' => __( 'Heading One Font Size', 'pliska' ), 'section' => 'font_section', 'type' => 'number', 'input_attrs' => array( 'min' => 24, 'max' => 48, 'step' => 1, ), 'description' => esc_html__( 'Change the size of the page title. Enter a number in pixels between 24 and 48. Default is 36.', 'pliska' ), ) ); $wp_customize->add_setting( 'heading_two_font_size', array( 'default' => '24', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'heading_two_font_size', array( 'label' => __( 'Heading Two Font Size', 'pliska' ), 'section' => 'font_section', 'type' => 'number', 'input_attrs' => array( 'min' => 20, 'max' => 32, 'step' => 1, ), 'description' => esc_html__( 'Change the size of Heading Two. This includes section titles such as the post headings on the post archives, widget titles and others. Enter a number in pixels between 20 and 32. Default is 24.', 'pliska' ), ) ); } add_action( 'customize_register', 'pliska_customize_fonts', 40 ); /** * Display custom font CSS. */ function pliska_business_fonts_css_container() { ?>