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['font-extras-h1'] = array( 'line-height' => ! isset( $astra_options['font-extras-h1'] ) && isset( $astra_options['line-height-h1'] ) ? $astra_options['line-height-h1'] : '1.4', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-h1'] ) && isset( $astra_options['text-transform-h1'] ) ? $astra_options['text-transform-h1'] : '', 'text-decoration' => '', ); // Header

. $defaults['font-family-h2'] = 'inherit'; $defaults['font-weight-h2'] = 'inherit'; $defaults['font-extras-h2'] = array( 'line-height' => ! isset( $astra_options['font-extras-h2'] ) && isset( $astra_options['line-height-h2'] ) ? $astra_options['line-height-h2'] : '1.25', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-h2'] ) && isset( $astra_options['text-transform-h2'] ) ? $astra_options['text-transform-h2'] : '', 'text-decoration' => '', ); // Header

. $defaults['font-family-h3'] = 'inherit'; $defaults['font-weight-h3'] = 'inherit'; $defaults['font-extras-h3'] = array( 'line-height' => ! isset( $astra_options['font-extras-h3'] ) && isset( $astra_options['line-height-h3'] ) ? $astra_options['line-height-h3'] : '1.2', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-h3'] ) && isset( $astra_options['text-transform-h3'] ) ? $astra_options['text-transform-h3'] : '', 'text-decoration' => '', ); // Header

. $defaults['font-family-h4'] = 'inherit'; $defaults['font-weight-h4'] = 'inherit'; $defaults['font-extras-h4'] = array( 'line-height' => ! isset( $astra_options['font-extras-h4'] ) && isset( $astra_options['line-height-h4'] ) ? $astra_options['line-height-h4'] : '1.2', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-h4'] ) && isset( $astra_options['text-transform-h4'] ) ? $astra_options['text-transform-h4'] : '', 'text-decoration' => '', ); // Header

. $defaults['font-family-h5'] = 'inherit'; $defaults['font-weight-h5'] = 'inherit'; $defaults['font-extras-h5'] = array( 'line-height' => ! isset( $astra_options['font-extras-h5'] ) && isset( $astra_options['line-height-h5'] ) ? $astra_options['line-height-h5'] : '1.2', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-h5'] ) && isset( $astra_options['text-transform-h5'] ) ? $astra_options['text-transform-h5'] : '', 'text-decoration' => '', ); // Header
. $defaults['font-family-h6'] = 'inherit'; $defaults['font-weight-h6'] = 'inherit'; $defaults['font-extras-h6'] = array( 'line-height' => ! isset( $astra_options['font-extras-h6'] ) && isset( $astra_options['line-height-h6'] ) ? $astra_options['line-height-h6'] : '1.25', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-h6'] ) && isset( $astra_options['text-transform-h6'] ) ? $astra_options['text-transform-h6'] : '', 'text-decoration' => '', ); /** * Theme button Font Defaults */ $defaults['font-weight-button'] = $apply_new_default_color_typo_values ? '500' : 'inherit'; $defaults['font-family-button'] = 'inherit'; $defaults['font-size-button'] = array( 'desktop' => $apply_new_default_color_typo_values ? '16' : '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-extras-button'] = array( 'line-height' => ! isset( $astra_options['font-extras-button'] ) && isset( $astra_options['theme-btn-line-height'] ) ? $astra_options['theme-btn-line-height'] : 1, 'line-height-unit' => 'em', 'letter-spacing' => ! isset( $astra_options['font-extras-button'] ) && isset( $astra_options['theme-btn-letter-spacing'] ) ? $astra_options['theme-btn-letter-spacing'] : '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-button'] ) && isset( $astra_options['text-transform-button'] ) ? $astra_options['text-transform-button'] : '', 'text-decoration' => '', ); 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 ); wp_localize_script( 'astra-heading-colors-customizer-preview-js', 'astraHeadingColorOptions', array( 'maybeApplyHeadingColorForTitle' => astra_has_global_color_format_support(), ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Heading_Colors_Loader();