add_section( 'body_settings', array( 'title' => __( 'Body Settings', 'blossom-floral-pro' ), 'priority' => 10, 'panel' => 'typography_settings' ) ); /** Note */ $wp_customize->add_setting( 'google_fonts_text', array( 'default' => '', 'sanitize_callback' => 'wp_kses_post' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Note_Control( $wp_customize, 'google_fonts_text', array( 'section' => 'body_settings', 'description' => sprintf( __( '%1$sClick here%2$s to see the list of supported Google Fonts.', 'blossom-floral-pro' ), '', '' ), ) ) ); /** Primary Font */ $wp_customize->add_setting( 'primary_font', array( 'default' => 'Questrial', 'sanitize_callback' => 'blossom_floral_pro_sanitize_select' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Select_Control( $wp_customize, 'primary_font', array( 'label' => __( 'Primary Font', 'blossom-floral-pro' ), 'description' => __( 'Primary font of the site.', 'blossom-floral-pro' ), 'section' => 'body_settings', 'choices' => blossom_floral_pro_get_all_fonts(), 'active_callback' => 'blossom_floral_pro_fonts_ac', ) ) ); /** Secondary Font */ $wp_customize->add_setting( 'secondary_font', array( 'default' => 'Crimson Pro', 'sanitize_callback' => 'blossom_floral_pro_sanitize_select' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Select_Control( $wp_customize, 'secondary_font', array( 'label' => __( 'Secondary Font', 'blossom-floral-pro' ), 'description' => __( 'Secondary font of the site.', 'blossom-floral-pro' ), 'section' => 'body_settings', 'choices' => blossom_floral_pro_get_all_fonts(), 'active_callback' => 'blossom_floral_pro_fonts_ac', ) ) ); /** Floral Fashion */ /** Primary Font */ $wp_customize->add_setting( 'primary_font_ff', array( 'default' => 'Inter', 'sanitize_callback' => 'blossom_floral_pro_sanitize_select' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Select_Control( $wp_customize, 'primary_font_ff', array( 'label' => __( 'Primary Font', 'blossom-floral-pro' ), 'description' => __( 'Primary font of the site.', 'blossom-floral-pro' ), 'section' => 'body_settings', 'choices' => blossom_floral_pro_get_all_fonts(), 'active_callback' => 'blossom_floral_pro_fonts_ac', ) ) ); /** Secondary Font */ $wp_customize->add_setting( 'secondary_font_ff', array( 'default' => 'Source Serif Pro', 'sanitize_callback' => 'blossom_floral_pro_sanitize_select' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Select_Control( $wp_customize, 'secondary_font_ff', array( 'label' => __( 'Secondary Font', 'blossom-floral-pro' ), 'description' => __( 'Secondary font of the site.', 'blossom-floral-pro' ), 'section' => 'body_settings', 'choices' => blossom_floral_pro_get_all_fonts(), 'active_callback' => 'blossom_floral_pro_fonts_ac', ) ) ); /** Elegant Travel */ /** Primary Font */ $wp_customize->add_setting( 'primary_font_et', array( 'default' => 'Lora', 'sanitize_callback' => 'blossom_floral_pro_sanitize_select' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Select_Control( $wp_customize, 'primary_font_et', array( 'label' => __( 'Primary Font', 'blossom-floral-pro' ), 'description' => __( 'Primary font of the site.', 'blossom-floral-pro' ), 'section' => 'body_settings', 'choices' => blossom_floral_pro_get_all_fonts(), 'active_callback' => 'blossom_floral_pro_fonts_ac', ) ) ); /** Secondary Font */ $wp_customize->add_setting( 'secondary_font_et', array( 'default' => 'EB Garamond', 'sanitize_callback' => 'blossom_floral_pro_sanitize_select' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Select_Control( $wp_customize, 'secondary_font_et', array( 'label' => __( 'Secondary Font', 'blossom-floral-pro' ), 'description' => __( 'Secondary font of the site.', 'blossom-floral-pro' ), 'section' => 'body_settings', 'choices' => blossom_floral_pro_get_all_fonts(), 'active_callback' => 'blossom_floral_pro_fonts_ac', ) ) ); /** Font Size*/ $wp_customize->add_setting( 'font_size', array( 'default' => 18, 'sanitize_callback' => 'blossom_floral_pro_sanitize_number_absint' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Slider_Control( $wp_customize, 'font_size', array( 'section' => 'body_settings', 'label' => __( 'Font Size', 'blossom-floral-pro' ), 'description' => __( 'Change the font size of your site.', 'blossom-floral-pro' ), 'choices' => array( 'min' => 10, 'max' => 50, 'step' => 1, ) ) ) ); /** Note */ $wp_customize->add_setting( 'typography_text', array( 'default' => '', 'sanitize_callback' => 'wp_kses_post' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Note_Control( $wp_customize, 'typography_text', array( 'section' => 'body_settings', 'description' => sprintf( __( 'To load google fonts from your own server instead from google\'s CDN enable the %1$sLocally Host Google Fonts%2$s option in Performance Settings.', 'blossom-floral-pro' ), '', '' ), ) ) ); /** Note */ $wp_customize->add_setting( 'typography_text_two', array( 'default' => '', 'sanitize_callback' => 'wp_kses_post' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Note_Control( $wp_customize, 'typography_text_two', array( 'section' => 'body_settings', 'description' => sprintf( __( 'To use Custom Fonts on your website, you can purchase WP Custom Fonts plugin. %1$sGet 20℅ off on the purchase.%2$s', 'blossom-floral-pro' ), '', '' ), ) ) ); } add_action( 'customize_register', 'blossom_floral_pro_customize_register_typography_body' );