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/. --- .../assets/js/minified/customizer-preview.min.js | 1 + .../assets/js/unminified/customizer-preview.js | 78 ++++ .../class-astra-heading-colors-loader.php | 161 ++++++++ .../heading-colors/class-astra-heading-colors.php | 47 +++ .../class-astra-heading-colors-configs.php | 426 +++++++++++++++++++++ .../heading-colors/dynamic-css/dynamic.css.php | 54 +++ 6 files changed, 767 insertions(+) create mode 100644 inc/addons/heading-colors/assets/js/minified/customizer-preview.min.js create mode 100644 inc/addons/heading-colors/assets/js/unminified/customizer-preview.js create mode 100644 inc/addons/heading-colors/class-astra-heading-colors-loader.php create mode 100644 inc/addons/heading-colors/class-astra-heading-colors.php create mode 100644 inc/addons/heading-colors/customizer/class-astra-heading-colors-configs.php create mode 100644 inc/addons/heading-colors/dynamic-css/dynamic.css.php (limited to 'inc/addons/heading-colors') diff --git a/inc/addons/heading-colors/assets/js/minified/customizer-preview.min.js b/inc/addons/heading-colors/assets/js/minified/customizer-preview.min.js new file mode 100644 index 0000000..9c856a1 --- /dev/null +++ b/inc/addons/heading-colors/assets/js/minified/customizer-preview.min.js @@ -0,0 +1 @@ +!function(){astra_css("astra-settings[heading-base-color]","color","h1, .entry-content h1, h2, .entry-content h2, h3, .entry-content h3, h4, .entry-content h4, h5, .entry-content h5, h6, .entry-content h6");var t,e,n,s,o,i="";astraCustomizer.font_weights_widget_title_support&&(s="h1.widget-title",o="h2.widget-title",i="h3.widget-title"),astra_generate_outside_font_family_css("astra-settings[font-family-h1]","h1, .entry-content h1"),astra_generate_font_weight_css("astra-settings[font-family-h1]","astra-settings[font-weight-h1]","font-weight","h1, .entry-content h1, "+s),astra_css("astra-settings[line-height-h1]","line-height","h1, .entry-content h1, .elementor-widget-heading h1.elementor-heading-title"),astra_css("astra-settings[text-transform-h1]","text-transform","h1, .entry-content h1"),astra_generate_outside_font_family_css("astra-settings[font-family-h2]","h2, .entry-content h2"),astra_generate_font_weight_css("astra-settings[font-family-h2]","astra-settings[font-weight-h2]","font-weight","h2, .entry-content h2, "+o),astra_css("astra-settings[line-height-h2]","line-height","h2, .entry-content h2, .elementor-widget-heading h2.elementor-heading-title"),astra_css("astra-settings[text-transform-h2]","text-transform","h2, .entry-content h2"),astra_generate_outside_font_family_css("astra-settings[font-family-h3]","h3, .entry-content h3"),astra_generate_font_weight_css("astra-settings[font-family-h3]","astra-settings[font-weight-h3]","font-weight","h3, .entry-content h3, "+i),astra_css("astra-settings[line-height-h3]","line-height","h3, .entry-content h3, .elementor-widget-heading h3.elementor-heading-title"),astra_css("astra-settings[text-transform-h3]","text-transform","h3, .entry-content h3"),astraCustomizer.page_builder_button_style_css?(i=o=s=n=e=t="","color-typo"!=astraCustomizer.elementor_default_color_font_setting&&"typo"!=astraCustomizer.elementor_default_color_font_setting||(n=",.elementor-button-wrapper .elementor-button.elementor-size-sm, .elementor-button-wrapper .elementor-button.elementor-size-xs, .elementor-button-wrapper .elementor-button.elementor-size-md, .elementor-button-wrapper .elementor-button.elementor-size-lg, .elementor-button-wrapper .elementor-button.elementor-size-xl, .elementor-button-wrapper .elementor-button",i=o=s=e=t=",.elementor-button-wrapper .elementor-button, .elementor-button-wrapper .elementor-button:visited"),astra_generate_outside_font_family_css("astra-settings[font-family-button]",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link'+t),astra_generate_font_weight_css("astra-settings[font-family-button]","astra-settings[font-weight-button]","font-weight",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link'+e),astra_css("astra-settings[text-transform-button]","text-transform",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link'+s),astra_responsive_font_size("astra-settings[font-size-button]",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link'+n),astra_css("astra-settings[theme-btn-line-height]","line-height",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link'+o),astra_css("astra-settings[theme-btn-letter-spacing]","letter-spacing",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link'+i,"px")):(astra_generate_outside_font_family_css("astra-settings[font-family-button]",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]'),astra_generate_font_weight_css("astra-settings[font-family-button]","astra-settings[font-weight-button]","font-weight",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]'),astra_css("astra-settings[text-transform-button]","text-transform",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]'),astra_responsive_font_size("astra-settings[font-size-button]",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]'),astra_css("astra-settings[theme-btn-line-height]","line-height",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]'),astra_css("astra-settings[theme-btn-letter-spacing]","letter-spacing",'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]',"px"))}(jQuery); \ No newline at end of file diff --git a/inc/addons/heading-colors/assets/js/unminified/customizer-preview.js b/inc/addons/heading-colors/assets/js/unminified/customizer-preview.js new file mode 100644 index 0000000..56a9544 --- /dev/null +++ b/inc/addons/heading-colors/assets/js/unminified/customizer-preview.js @@ -0,0 +1,78 @@ +/** + * This file adds some LIVE to the Customizer live preview. To leverage + * this, set your custom settings to 'postMessage' and then add your handling + * here. Your javascript should grab settings from customizer controls, and + * then make any necessary changes to the page using jQuery. + * + * @package Astra + * @since 3.0.0 + */ + +( function( $ ) { + + /** + * Content

to

headings + */ + astra_css( 'astra-settings[heading-base-color]', 'color', 'h1, .entry-content h1, h2, .entry-content h2, h3, .entry-content h3, h4, .entry-content h4, h5, .entry-content h5, h6, .entry-content h6' ); + + var h1_widget_title, h2_widget_title, h3_widget_title = ''; + if( astraCustomizer.font_weights_widget_title_support ) { + h1_widget_title = 'h1.widget-title'; + h2_widget_title = 'h2.widget-title'; + h3_widget_title = 'h3.widget-title'; + } + + astra_generate_outside_font_family_css( 'astra-settings[font-family-h1]', 'h1, .entry-content h1' ); + astra_generate_font_weight_css( 'astra-settings[font-family-h1]', 'astra-settings[font-weight-h1]', 'font-weight', 'h1, .entry-content h1, ' + h1_widget_title ); + astra_css('astra-settings[line-height-h1]', 'line-height', 'h1, .entry-content h1, .elementor-widget-heading h1.elementor-heading-title'); + astra_css('astra-settings[text-transform-h1]', 'text-transform', 'h1, .entry-content h1'); + + astra_generate_outside_font_family_css( 'astra-settings[font-family-h2]', 'h2, .entry-content h2' ); + astra_generate_font_weight_css( 'astra-settings[font-family-h2]', 'astra-settings[font-weight-h2]', 'font-weight', 'h2, .entry-content h2, ' + h2_widget_title ); + astra_css('astra-settings[line-height-h2]', 'line-height', 'h2, .entry-content h2, .elementor-widget-heading h2.elementor-heading-title'); + astra_css('astra-settings[text-transform-h2]', 'text-transform', 'h2, .entry-content h2'); + + astra_generate_outside_font_family_css( 'astra-settings[font-family-h3]', 'h3, .entry-content h3' ); + astra_generate_font_weight_css( 'astra-settings[font-family-h3]', 'astra-settings[font-weight-h3]', 'font-weight', 'h3, .entry-content h3, ' + h3_widget_title ); + astra_css('astra-settings[line-height-h3]', 'line-height', 'h3, .entry-content h3, .elementor-widget-heading h3.elementor-heading-title'); + astra_css('astra-settings[text-transform-h3]', 'text-transform', 'h3, .entry-content h3'); + + + if ( astraCustomizer.page_builder_button_style_css ) { + + var ele_btn_font_family = ''; + var ele_btn_font_weight = ''; + var ele_btn_font_size = ''; + var ele_btn_transform = ''; + var ele_btn_line_height = ''; + var ele_btn_letter_spacing = ''; + + if ( 'color-typo' == astraCustomizer.elementor_default_color_font_setting || 'typo' == astraCustomizer.elementor_default_color_font_setting ) { + // Button Typo + ele_btn_font_family = ',.elementor-button-wrapper .elementor-button, .elementor-button-wrapper .elementor-button:visited'; + ele_btn_font_weight = ',.elementor-button-wrapper .elementor-button, .elementor-button-wrapper .elementor-button:visited'; + ele_btn_font_size = ',.elementor-button-wrapper .elementor-button.elementor-size-sm, .elementor-button-wrapper .elementor-button.elementor-size-xs, .elementor-button-wrapper .elementor-button.elementor-size-md, .elementor-button-wrapper .elementor-button.elementor-size-lg, .elementor-button-wrapper .elementor-button.elementor-size-xl, .elementor-button-wrapper .elementor-button'; + ele_btn_transform = ',.elementor-button-wrapper .elementor-button, .elementor-button-wrapper .elementor-button:visited'; + ele_btn_line_height = ',.elementor-button-wrapper .elementor-button, .elementor-button-wrapper .elementor-button:visited'; + ele_btn_letter_spacing = ',.elementor-button-wrapper .elementor-button, .elementor-button-wrapper .elementor-button:visited', 'px'; + } + + // Button Typo + astra_generate_outside_font_family_css( 'astra-settings[font-family-button]', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link' + ele_btn_font_family ); + astra_generate_font_weight_css( 'astra-settings[font-family-button]', 'astra-settings[font-weight-button]', 'font-weight', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link' + ele_btn_font_weight ); + astra_css( 'astra-settings[text-transform-button]', 'text-transform', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link' + ele_btn_transform ); + astra_responsive_font_size( 'astra-settings[font-size-button]', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link' + ele_btn_font_size ); + astra_css( 'astra-settings[theme-btn-line-height]', 'line-height', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link' + ele_btn_line_height ); + astra_css( 'astra-settings[theme-btn-letter-spacing]', 'letter-spacing', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], .wp-block-button .wp-block-button__link' + ele_btn_letter_spacing, 'px' ); + + } else { + // Button Typo + astra_generate_outside_font_family_css( 'astra-settings[font-family-button]', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' ); + astra_generate_font_weight_css( 'astra-settings[font-family-button]', 'astra-settings[font-weight-button]', 'font-weight', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' ); + astra_css( 'astra-settings[text-transform-button]', 'text-transform', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' ); + astra_responsive_font_size( 'astra-settings[font-size-button]', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' ); + astra_css( 'astra-settings[theme-btn-line-height]', 'line-height', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' ); + astra_css( 'astra-settings[theme-btn-letter-spacing]', 'letter-spacing', 'button, .ast-button, .ast-custom-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]', 'px' ); + } + +} )( jQuery ); diff --git a/inc/addons/heading-colors/class-astra-heading-colors-loader.php b/inc/addons/heading-colors/class-astra-heading-colors-loader.php new file mode 100644 index 0000000..3a27549 --- /dev/null +++ b/inc/addons/heading-colors/class-astra-heading-colors-loader.php @@ -0,0 +1,161 @@ + to
+ */ + $defaults['h1-color'] = ''; + $defaults['h2-color'] = ''; + $defaults['h3-color'] = ''; + $defaults['h4-color'] = ''; + $defaults['h5-color'] = ''; + $defaults['h6-color'] = ''; + + // Header

. + $defaults['font-family-h1'] = 'inherit'; + $defaults['font-weight-h1'] = 'inherit'; + $defaults['text-transform-h1'] = ''; + $defaults['line-height-h1'] = ''; + + // Header

. + $defaults['font-family-h2'] = 'inherit'; + $defaults['font-weight-h2'] = 'inherit'; + $defaults['text-transform-h2'] = ''; + $defaults['line-height-h2'] = ''; + + // Header

. + $defaults['font-family-h3'] = 'inherit'; + $defaults['font-weight-h3'] = 'inherit'; + $defaults['text-transform-h3'] = ''; + $defaults['line-height-h3'] = ''; + + /** + * Theme button Font Defaults + */ + $defaults['font-weight-button'] = 'inherit'; + $defaults['font-family-button'] = 'inherit'; + $defaults['font-size-button'] = array( + 'desktop' => '', + 'tablet' => '', + 'mobile' => '', + 'desktop-unit' => 'px', + 'tablet-unit' => 'px', + 'mobile-unit' => 'px', + ); + $defaults['text-transform-button'] = ''; + + /** + * Check backward compatibility for button line height. + */ + $defaults['theme-btn-line-height'] = 1; + $defaults['theme-btn-letter-spacing'] = ''; + + return $defaults; + } + + /** + * Load color configs for the Heading Colors. + * + * @param WP_Customize_Manager $wp_customize Theme Customizer object. + * + * @since 2.2.0 + */ + public function customize_register( $wp_customize ) { + + /** + * Register Panel & Sections + */ + require_once ASTRA_THEME_HEADING_COLORS_DIR . 'customizer/class-astra-heading-colors-configs.php';// phpcs:ignore: WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound + } + + /** + * Customizer Preview + * + * @since 2.2.0 + */ + public function preview_scripts() { + /** + * Load unminified if SCRIPT_DEBUG is true. + */ + /* Directory and Extension */ + $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified'; + $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min'; + wp_enqueue_script( 'astra-heading-colors-customizer-preview-js', ASTRA_THEME_HEADING_COLORS_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); + } +} + +/** +* Kicking this off by creating the object of the class. +*/ +new Astra_Heading_Colors_Loader(); diff --git a/inc/addons/heading-colors/class-astra-heading-colors.php b/inc/addons/heading-colors/class-astra-heading-colors.php new file mode 100644 index 0000000..7de04b8 --- /dev/null +++ b/inc/addons/heading-colors/class-astra-heading-colors.php @@ -0,0 +1,47 @@ + astra_get_option( 'heading-base-color' ), + 'type' => 'control', + 'control' => 'ast-color', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ), + 'transport' => 'postMessage', + 'priority' => 18, + 'name' => ASTRA_THEME_SETTINGS . '[heading-base-color]', + 'title' => __( 'Heading Color ( H1 - H6 )', 'astra' ), + 'section' => ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'colors-and-background' ) ) ? 'section-colors-body' : 'section-colors-background', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Heading Typography starts here - h1 - h3 + */ + + /** + * Option: Heading

Font Family + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-family-h1]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-family', + 'default' => astra_get_option( 'font-family-h1' ), + 'title' => __( 'Family', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 5, + 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-h1]', + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Font Weight + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-weight-h1]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-weight', + 'title' => __( 'Weight', 'astra' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'font-weight-h1' ), + 'section' => 'section-content-typo', + 'priority' => 7, + 'connect' => ASTRA_THEME_SETTINGS . '[font-family-h1]', + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Text Transform + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[text-transform-h1]', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'text-transform-h1' ), + 'title' => __( 'Text Transform', 'astra' ), + 'type' => 'control', + 'control' => 'ast-select', + 'priority' => 8, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Line Height + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[line-height-h1]', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'line-height-h1' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'type' => 'control', + 'control' => 'ast-slider', + 'title' => __( 'Line Height', 'astra' ), + 'transport' => 'postMessage', + 'priority' => 8, + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + + /** + * Option: Heading

Font Family + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-family-h2]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-family', + 'title' => __( 'Family', 'astra' ), + 'default' => astra_get_option( 'font-family-h2' ), + 'section' => 'section-content-typo', + 'priority' => 10, + 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-h2]', + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Font Weight + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-weight-h2]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-weight', + 'title' => __( 'Weight', 'astra' ), + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'font-weight-h2' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'priority' => 12, + 'connect' => ASTRA_THEME_SETTINGS . '[font-family-h2]', + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Text Transform + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[text-transform-h2]', + 'section' => 'section-content-typo', + 'default' => astra_get_option( 'text-transform-h2' ), + 'title' => __( 'Text Transform', 'astra' ), + 'type' => 'control', + 'control' => 'ast-select', + 'transport' => 'postMessage', + 'priority' => 13, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Line Height + */ + + array( + 'name' => ASTRA_THEME_SETTINGS . '[line-height-h2]', + 'section' => 'section-content-typo', + 'type' => 'control', + 'control' => 'ast-slider', + 'default' => astra_get_option( 'line-height-h2' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'transport' => 'postMessage', + 'title' => __( 'Line Height', 'astra' ), + 'priority' => 14, + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + + /** + * Option: Heading

Font Family + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-family-h3]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-family', + 'default' => astra_get_option( 'font-family-h3' ), + 'title' => __( 'Family', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 15, + 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-h3]', + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Font Weight + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[font-weight-h3]', + 'type' => 'control', + 'control' => 'ast-font', + 'font-type' => 'ast-font-weight', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'font-weight-h3' ), + 'title' => __( 'Weight', 'astra' ), + 'section' => 'section-content-typo', + 'priority' => 17, + 'connect' => ASTRA_THEME_SETTINGS . '[font-family-h3]', + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Text Transform + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[text-transform-h3]', + 'type' => 'control', + 'section' => 'section-content-typo', + 'title' => __( 'Text Transform', 'astra' ), + 'default' => astra_get_option( 'text-transform-h3' ), + 'transport' => 'postMessage', + 'control' => 'ast-select', + 'priority' => 18, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + 'transport' => 'postMessage', + ), + + /** + * Option: Heading

Line Height + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[line-height-h3]', + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-content-typo', + 'title' => __( 'Line Height', 'astra' ), + 'transport' => 'postMessage', + 'default' => astra_get_option( 'line-height-h3' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'priority' => 19, + 'suffix' => 'em', + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + + + /** + * Option: Button Typography Heading + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[button-text-typography]', + 'default' => astra_get_option( 'button-text-typography' ), + 'type' => 'control', + 'control' => 'ast-settings-group', + 'title' => __( 'Button Font', 'astra' ), + 'section' => 'section-buttons', + 'transport' => 'postMessage', + 'priority' => 25, + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + ), + + /** + * Option: Button Font Family + */ + array( + 'name' => 'font-family-button', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[button-text-typography]', + 'section' => 'section-buttons', + 'control' => 'ast-font', + 'font_type' => 'ast-font-family', + 'title' => __( 'Family', 'astra' ), + 'default' => astra_get_option( 'font-family-button' ), + 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-button]', + 'priority' => 1, + ), + + /** + * Option: Button Font Size + */ + array( + 'name' => 'font-size-button', + 'transport' => 'postMessage', + 'title' => __( 'Size', 'astra' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[button-text-typography]', + 'section' => 'section-buttons', + 'control' => 'ast-responsive', + 'priority' => 2, + 'default' => astra_get_option( 'font-size-button' ), + 'input_attrs' => array( + 'min' => 0, + ), + 'units' => array( + 'px' => 'px', + 'em' => 'em', + ), + ), + + /** + * Option: Button Font Weight + */ + array( + 'name' => 'font-weight-button', + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[button-text-typography]', + 'section' => 'section-buttons', + 'control' => 'ast-font', + 'font_type' => 'ast-font-weight', + 'title' => __( 'Weight', 'astra' ), + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), + 'default' => astra_get_option( 'font-weight-button' ), + 'connect' => 'font-family-button', + 'priority' => 3, + ), + + /** + * Option: Button Text Transform + */ + array( + 'name' => 'text-transform-button', + 'transport' => 'postMessage', + 'default' => astra_get_option( 'text-transform-button' ), + 'title' => __( 'Text Transform', 'astra' ), + 'type' => 'sub-control', + 'parent' => ASTRA_THEME_SETTINGS . '[button-text-typography]', + 'section' => 'section-buttons', + 'control' => 'ast-select', + 'priority' => 4, + 'choices' => array( + '' => __( 'Inherit', 'astra' ), + 'none' => __( 'None', 'astra' ), + 'capitalize' => __( 'Capitalize', 'astra' ), + 'uppercase' => __( 'Uppercase', 'astra' ), + 'lowercase' => __( 'Lowercase', 'astra' ), + ), + ), + + /** + * Option: Theme Button Line Height + */ + array( + 'name' => 'theme-btn-line-height', + 'control' => 'ast-slider', + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'default' => astra_get_option( 'theme-btn-line-height' ), + 'parent' => ASTRA_THEME_SETTINGS . '[button-text-typography]', + 'section' => 'section-buttons', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'title' => __( 'Line Height', 'astra' ), + 'suffix' => 'em', + 'priority' => 5, + 'input_attrs' => array( + 'min' => 1, + 'step' => 0.01, + 'max' => 5, + ), + ), + + /** + * Option: Theme Button Line Height + */ + array( + 'name' => 'theme-btn-letter-spacing', + 'control' => 'ast-slider', + 'transport' => 'postMessage', + 'type' => 'sub-control', + 'default' => astra_get_option( 'theme-btn-letter-spacing' ), + 'parent' => ASTRA_THEME_SETTINGS . '[button-text-typography]', + 'section' => 'section-buttons', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), + 'title' => __( 'Letter Spacing', 'astra' ), + 'suffix' => 'px', + 'priority' => 6, + 'input_attrs' => array( + 'min' => 1, + 'step' => 1, + 'max' => 100, + ), + ), + + ); + + return array_merge( $configurations, $_configs ); + + } + } +} + +new Astra_Heading_Colors_Configs(); diff --git a/inc/addons/heading-colors/dynamic-css/dynamic.css.php b/inc/addons/heading-colors/dynamic-css/dynamic.css.php new file mode 100644 index 0000000..e591b9c --- /dev/null +++ b/inc/addons/heading-colors/dynamic-css/dynamic.css.php @@ -0,0 +1,54 @@ + array( + 'color' => esc_attr( $heading_base_color ), + ), + ); + + /* Parse CSS from array() */ + $css_output = astra_parse_css( $css_output ); + + $dynamic_css .= $css_output; + + return $dynamic_css; +} -- cgit v1.2.3-70-g09d2