1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<?php
/**
* Heading Colors - Dynamic CSS
*
* @package Astra
* @since 2.1.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Heading Colors
*/
add_filter( 'astra_dynamic_theme_css', 'astra_heading_colors_section_dynamic_css' );
/**
* Dynamic CSS
*
* @param string $dynamic_css Astra Dynamic CSS.
* @param string $dynamic_css_filtered Astra Dynamic CSS Filters.
* @return String Generated dynamic CSS for Heading Colors.
*
* @since 2.1.4
*/
function astra_heading_colors_section_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) {
/**
* Heading Colors - h1 - h6.
*/
$heading_base_color = astra_get_option( 'heading-base-color' );
/**
* Normal Colors without reponsive option.
* [1]. Heading Colors
*/
$css_output = array(
/**
* Content base heading 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' => 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;
}
|