From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- .../class-astra-archive-typo-configs.php | 197 +++++++++++++++ .../typography/class-astra-body-typo-configs.php | 277 +++++++++++++++++++++ .../class-astra-content-typo-configs.php | 272 ++++++++++++++++++++ .../typography/class-astra-header-typo-configs.php | 230 +++++++++++++++++ .../typography/class-astra-single-typo-configs.php | 136 ++++++++++ 5 files changed, 1112 insertions(+) create mode 100644 inc/customizer/configurations/typography/class-astra-archive-typo-configs.php create mode 100644 inc/customizer/configurations/typography/class-astra-body-typo-configs.php create mode 100644 inc/customizer/configurations/typography/class-astra-content-typo-configs.php create mode 100644 inc/customizer/configurations/typography/class-astra-header-typo-configs.php create mode 100644 inc/customizer/configurations/typography/class-astra-single-typo-configs.php (limited to 'inc/customizer/configurations/typography') diff --git a/inc/customizer/configurations/typography/class-astra-archive-typo-configs.php b/inc/customizer/configurations/typography/class-astra-archive-typo-configs.php new file mode 100644 index 0000000..746ccd3 --- /dev/null +++ b/inc/customizer/configurations/typography/class-astra-archive-typo-configs.php @@ -0,0 +1,197 @@ + ASTRA_THEME_SETTINGS . '[ast-blog-typography-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-blog', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + ); + } + + if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { + + $new_configs = array( + + /** + * Option: Blog / Archive Typography + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-content-archive-summary-typo]', + 'default' => astra_get_option( 'blog-content-archive-summary-typo' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Archive Title Font', 'astra' ), + 'section' => 'section-blog', + 'transport' => 'postMessage', + 'priority' => 140, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Archive Summary Box Title Font Size + */ + array( + 'name' => 'font-size-archive-summary-title', + 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-archive-summary-typo]', + 'section' => 'section-blog', + 'type' => 'sub-control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'font-size-archive-summary-title' ), + 'priority' => 8, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', + 'default' => astra_get_option( 'blog-content-blog-post-title-typo' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Post Title Font', 'astra' ), + 'section' => 'section-blog', + 'transport' => 'postMessage', + 'priority' => 140, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Blog - Post Title Font Size + */ + array( + 'name' => 'font-size-page-title', + 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', + 'section' => 'section-blog', + 'type' => 'sub-control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'priority' => 2, + 'default' => astra_get_option( 'font-size-page-title' ), + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + } else { + + $new_configs = array( + + /** + * Option: Archive Summary Box Title Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-archive-summary-title]', + 'section' => 'section-blog', + 'type' => 'control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'font-size-archive-summary-title' ), + 'title' => __( 'Archive Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'priority' => 140, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Blog - Post Title Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-page-title]', + 'section' => 'section-blog', + 'type' => 'control', + 'control' => 'ast-responsive', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'font-size-page-title' ), + 'title' => __( 'Post Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'priority' => 140, + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + ); + } + + $_configs = array_merge( $_configs, $new_configs ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Archive_Typo_Configs(); diff --git a/inc/customizer/configurations/typography/class-astra-body-typo-configs.php b/inc/customizer/configurations/typography/class-astra-body-typo-configs.php new file mode 100644 index 0000000..400af19 --- /dev/null +++ b/inc/customizer/configurations/typography/class-astra-body-typo-configs.php @@ -0,0 +1,277 @@ + ASTRA_THEME_SETTINGS . '[body-font-family]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-family', + 'ast_inherit' => __( 'Default System Font', 'astra' ), + 'default' => astra_get_option( 'body-font-family' ), + 'section' => 'section-body-typo', + 'priority' => 5, + 'title' => __( 'Body Font Family', 'astra' ), + 'connect' => ASTRA_THEME_SETTINGS . '[body-font-weight]', + 'variant' => ASTRA_THEME_SETTINGS . '[body-font-variant]', + ), + + /** + * Option: Font Variant + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-font-variant]', + 'type' => 'control', + 'control' => 'ast-font-variant', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_variant' ), + 'default' => astra_get_option( 'body-font-variant' ), + 'ast_inherit' => __( 'Default', 'astra' ), + 'section' => 'section-body-typo', + 'priority' => 6, + 'title' => __( 'Variants', 'astra' ), + 'variant' => ASTRA_THEME_SETTINGS . '[body-font-family]', + ), + + /** + * Option: Font Weight + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-font-weight]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-weight', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'body-font-weight' ), + 'ast_inherit' => __( 'Default', 'astra' ), + 'section' => 'section-body-typo', + 'priority' => 15, + 'title' => __( 'Weight', 'astra' ), + 'connect' => ASTRA_THEME_SETTINGS . '[body-font-family]', + ), + + /** + * Option: Body Text Transform + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-text-transform]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-body-typo', + 'default' => astra_get_option( 'body-text-transform' ), + 'priority' => 20, + 'title' => __( 'Text Transform', 'astra' ), + 'choices' => array( + '' => __( 'Default', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + ), + + /** + * Option: Body Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-body]', + 'type' => 'control', + 'control' => 'ast-responsive-slider', + 'section' => 'section-body-typo', + 'default' => astra_get_option( 'font-size-body' ), + 'priority' => 10, + 'title' => __( 'Size', 'astra' ), + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + ), + ), + + /** + * Option: Body Line Height + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[body-line-height]', + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-body-typo', + 'default' => astra_get_option( 'body-line-height' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'priority' => 25, + 'title' => __( 'Line Height', 'astra' ), + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Paragraph Margin Bottom + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[para-margin-bottom]', + 'type' => 'control', + 'control' => 'ast-slider', + 'default' => astra_get_option( 'para-margin-bottom' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'transport' => 'postMessage', + 'section' => 'section-body-typo', + 'priority' => 25, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'title' => __( 'Paragraph Margin Bottom', 'astra' ), + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 0.5, + 'step' => 0.01, + 'max' => 5, + ), + ), + + /** + * Option: Underline links in entry-content. + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[underline-content-links]', + 'default' => astra_get_option( 'underline-content-links' ), + 'type' => 'control', + 'control' => 'ast-toggle-control', + 'section' => 'section-body-typo', + 'priority' => 27, + 'title' => __( 'Underline Content Links', 'astra' ), + 'transport' => 'postMessage', + ), + + /** + * Option: Headings Font Family + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-font-family]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-family', + 'default' => astra_get_option( 'headings-font-family' ), + 'title' => __( 'Heading Font Family', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 3, + 'connect' => ASTRA_THEME_SETTINGS . '[headings-font-weight]', + 'variant' => ASTRA_THEME_SETTINGS . '[headings-font-variant]', + ), + + /** + * Option: Font Variant + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-font-variant]', + 'type' => 'control', + 'control' => 'ast-font-variant', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_variant' ), + 'default' => astra_get_option( 'headings-font-variant' ), + 'ast_inherit' => __( 'Default', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 3, + 'title' => __( 'Variants', 'astra' ), + 'variant' => ASTRA_THEME_SETTINGS . '[headings-font-family]', + ), + + /** + * Option: Headings Font Weight + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-font-weight]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-weight', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'headings-font-weight' ), + 'title' => __( 'Weight', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 3, + 'connect' => ASTRA_THEME_SETTINGS . '[headings-font-family]', + ), + + /** + * Option: Headings Text Transform + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-text-transform]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-content-typo', + 'title' => __( 'Text Transform', 'astra' ), + 'default' => astra_get_option( 'headings-text-transform' ), + 'priority' => 3, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + ), + + /** + * Option: Heading

Line Height + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[headings-line-height]', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'headings-line-height' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'type' => 'control', + 'control' => 'ast-slider', + 'title' => __( 'Line Height', 'astra' ), + 'transport' => 'postMessage', + 'priority' => 4, + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + ); + + return array_merge( $configurations, $_configs ); + } + } +} + +new Astra_Body_Typo_Configs(); diff --git a/inc/customizer/configurations/typography/class-astra-content-typo-configs.php b/inc/customizer/configurations/typography/class-astra-content-typo-configs.php new file mode 100644 index 0000000..e6a99d2 --- /dev/null +++ b/inc/customizer/configurations/typography/class-astra-content-typo-configs.php @@ -0,0 +1,272 @@ + ASTRA_THEME_SETTINGS . '[divider-section-h1]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 4, + 'title' => __( 'Heading 1', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 1 (H1) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h1]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h1' ), + 'transport' => 'postMessage', + 'priority' => 6, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 2 (H2) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h2]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 9, + 'title' => __( 'Heading 2', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 2 (H2) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h2]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h2' ), + 'transport' => 'postMessage', + 'priority' => 11, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 3 (H3) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h3]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 15, + 'title' => __( 'Heading 3', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 3 (H3) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h3]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'priority' => 16, + 'default' => astra_get_option( 'font-size-h3' ), + 'transport' => 'postMessage', + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 4 (H4) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h4]', + 'type' => 'control', + 'title' => __( 'Heading 4', 'astra' ), + 'section' => 'section-content-typo', + 'control' => 'ast-heading', + 'priority' => 20, + 'settings' => array(), + ), + + /** + * Option: Heading 4 (H4) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h4]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h4' ), + 'transport' => 'postMessage', + 'priority' => 21, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 5 (H5) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h5]', + 'type' => 'control', + 'control' => 'ast-heading', + 'section' => 'section-content-typo', + 'priority' => 25, + 'title' => __( 'Heading 5', 'astra' ), + 'settings' => array(), + ), + + /** + * Option: Heading 5 (H5) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h5]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h5' ), + 'transport' => 'postMessage', + 'priority' => 26, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Heading 6 (H6) Divider + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[divider-section-h6]', + 'type' => 'control', + 'control' => 'ast-heading', + 'title' => __( 'Heading 6', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 30, + 'settings' => array(), + ), + + /** + * Option: Heading 6 (H6) Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-h6]', + 'type' => 'control', + 'control' => 'ast-responsive', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-size-h6' ), + 'transport' => 'postMessage', + 'priority' => 31, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + // Learn More link if Astra Pro is not activated. + if ( ! defined( 'ASTRA_EXT_VER' ) ) { + + $_configs = array( + /** + * Option: Learn More about Contant Typography + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[ast-content-typography-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-content-typo', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + } + + return $configurations; + } + } +} + +new Astra_Content_Typo_Configs(); + + diff --git a/inc/customizer/configurations/typography/class-astra-header-typo-configs.php b/inc/customizer/configurations/typography/class-astra-header-typo-configs.php new file mode 100644 index 0000000..6bff400 --- /dev/null +++ b/inc/customizer/configurations/typography/class-astra-header-typo-configs.php @@ -0,0 +1,230 @@ + 'font-size-site-title', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[site-title-typography]', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-title' ), + 'transport' => 'postMessage', + 'priority' => 9, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Site Tagline Font Size + */ + array( + 'name' => 'font-size-site-tagline', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-tagline' ), + 'transport' => 'postMessage', + 'priority' => 14, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + } else { + + $_configs = array( + + /** + * Option: Site Title Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-site-title]', + 'type' => 'control', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-title' ), + 'transport' => 'postMessage', + 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 16 : 8, + 'title' => __( 'Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( + Astra_Builder_Helper::$design_tab_config, + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ) : array( + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ), + ), + + /** + * Option: Site Tagline Font Size + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-site-tagline]', + 'type' => 'control', + 'section' => 'title_tagline', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-site-tagline' ), + 'transport' => 'postMessage', + 'priority' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? 20 : 12, + 'title' => __( 'Tagline Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? array( + Astra_Builder_Helper::$design_tab_config, + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ) : array( + array( + 'relation' => 'OR', + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'desktop', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'tablet', + 'operator' => '==', + 'value' => true, + ), + array( + 'setting' => ASTRA_THEME_SETTINGS . '[display-site-tagline-responsive]', + 'setting-key' => 'mobile', + 'operator' => '==', + 'value' => true, + ), + ), + ), + ), + ); + } + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Header_Typo_Configs(); + + diff --git a/inc/customizer/configurations/typography/class-astra-single-typo-configs.php b/inc/customizer/configurations/typography/class-astra-single-typo-configs.php new file mode 100644 index 0000000..a1dd398 --- /dev/null +++ b/inc/customizer/configurations/typography/class-astra-single-typo-configs.php @@ -0,0 +1,136 @@ + ASTRA_THEME_SETTINGS . '[ast-sngle-blog-typography-more-feature-description]', + 'type' => 'control', + 'control' => 'ast-description', + 'section' => 'section-blog-single', + 'priority' => 999, + 'title' => '', + 'help' => '

' . __( 'More Options Available in Astra Pro!', 'astra' ) . '

' . __( 'Learn More', 'astra' ) . '', + 'settings' => array(), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + ); + } + + if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'typography' ) ) { + + $new_configs = array( + + array( + 'name' => ASTRA_THEME_SETTINGS . '[blog-single-title-typo]', + 'type' => 'control', + 'priority' => Astra_Builder_Helper::$is_header_footer_builder_active ? + 13 : 20, + 'control' => 'ast-settings-group', + 'title' => __( 'Post / Page Title Font', 'astra' ), + 'section' => 'section-blog-single', + 'transport' => 'postMessage', + 'context' => Astra_Builder_Helper::$is_header_footer_builder_active ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ), + + /** + * Option: Single Post / Page Title Font Size + */ + array( + 'name' => 'font-size-entry-title', + 'parent' => ASTRA_THEME_SETTINGS . '[blog-single-title-typo]', + 'section' => 'section-blog-single', + 'type' => 'sub-control', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-entry-title' ), + 'transport' => 'postMessage', + 'priority' => 8, + 'title' => __( 'Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + ); + } else { + + $new_configs = array(); + + /** + * Option: Single Post / Page Title Font Size + */ + $new_configs[] = array( + 'name' => ASTRA_THEME_SETTINGS . '[font-size-entry-title]', + 'section' => 'section-blog-single', + 'type' => 'control', + 'control' => 'ast-responsive', + 'default' => astra_get_option( 'font-size-entry-title' ), + 'transport' => 'postMessage', + 'priority' => 9, + 'title' => __( 'Post / Page Title Font Size', 'astra' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + 'context' => ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) ? + Astra_Builder_Helper::$design_tab : Astra_Builder_Helper::$general_tab, + ); + } + + $_configs = array_merge( $_configs, $new_configs ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + } + } +} + +new Astra_Single_Typo_Configs(); -- cgit v1.2.3-70-g09d2