add_panel( $panel , array( 'title' => esc_html__( 'Global Options', 'aces' ), 'priority' => 10, ) ); // Path $dir = ACES_THEME_DIR . 'inc/customizer/settings/'; // Load customize control classes require_once( $dir . 'global/color-background.php'); require_once( $dir . 'global/container.php'); require_once( $dir . 'global/typography.php'); require_once( $dir . 'global/buttons.php'); require_once( $dir . 'global/breadcrumb.php'); } /** * Get CSS * * @since 1.0.0 */ public static function aces_global_css( $globalcss ) { // Define css var $css = ''; //Color & Background $primary = get_theme_mod( 'aces_primary_color' ); $primary_link = get_theme_mod( 'aces_primary_link_color'); $primary_link_hover = get_theme_mod( 'aces_primary_link_hover_color'); if ( ! empty( $primary ) ) { $css .= 'body, .page-content, .entry-content, .entry-summary{color:'. $primary .';}'; } if ( ! empty( $primary_link ) ) { $css .= 'a, .widget a, a:visited{color:'. $primary_link .';}'; } if ( ! empty( $primary_link_hover ) ) { $css .= 'a:hover, .widget a:hover{color:'. $primary_link_hover .';}'; } //Container $full_width_length = get_theme_mod( 'aces_full_width_length' ); $site_layout = get_theme_mod( 'aces_main_layout_style' ); $boxed_out_bg = get_theme_mod( 'aces_boxed_outside_background' ); $boxed_in_bg = get_theme_mod( 'aces_boxed_inside_background' ); $boxed_width_length = get_theme_mod( 'aces_boxed_width_length','1000' ); if ( ! empty( $full_width_length ) ) { $css .= '.container{max-width:'. $full_width_length .'px;}'; } if ( ! empty( $site_layout && $site_layout == "boxed" ) ) { $css .= '.boxed{width:'. $boxed_width_length .'px; max-width: 100%;}'; $css .= '.container{max-width:100%;}'; } if ( ! empty( $site_layout && $site_layout == "boxed" ) ) { if ( ! empty( $boxed_out_bg ) ) { $css .= 'body, body.custom-backgroud{background-color:'. $boxed_out_bg .' !important;}'; } if ( ! empty( $boxed_in_bg ) ) { $css .= '.boxed{background-color:'. $boxed_in_bg .';}'; $css .= '.aces-top-bar, .aces-branding-bar, .site-content {background-color: transparent; }'; } $boxed_x_offset = get_theme_mod( 'aces_boxed_x_offset','0' ); $boxed_y_offset = get_theme_mod( 'aces_boxed_y_offset','0' ); $boxed_blur = get_theme_mod( 'aces_boxed_blur','0' ); $boxed_spred = get_theme_mod( 'aces_boxed_spred','0' ); $boxed_shadow_color = get_theme_mod( 'aces_boxed_shadow_color','#fff' ); if ( ! empty( $boxed_shadow_color) ) { $css .= '.boxed{box-shadow:'. $boxed_x_offset.'px '. $boxed_y_offset .'px '. $boxed_blur .'px '. $boxed_spred .'px '. $boxed_shadow_color.' ;}'; } //layout $top_margin = get_theme_mod( 'aces_site_container_top_margin' ); $bottom_margin = get_theme_mod( 'aces_site_container_bottom_margin' ); $tablet_top_margin = get_theme_mod( 'aces_site_container_tablet_top_margin' ); $tablet_bottom_margin = get_theme_mod( 'aces_site_container_tablet_bottom_margin' ); $mobile_top_margin = get_theme_mod( 'aces_site_container_mobile_top_margin' ); $mobile_bottom_margin = get_theme_mod( 'aces_site_container_mobile_bottom_margin' ); $right_margin = "auto"; $left_margin = "auto"; // Top bar margin if ( isset( $top_margin ) && '' != $top_margin && '' != $top_margin || isset( $bottom_margin ) && '' != $bottom_margin && '' != $bottom_margin ) { $css .= '.boxed{margin:'. aces_spacing_css_top_bottom( $top_margin, $right_margin, $bottom_margin, $left_margin) .'}'; } // Tablet top bar margin if ( isset( $tablet_top_margin ) && '' != $tablet_top_margin || isset( $tablet_bottom_margin ) && '' != $tablet_bottom_margin) { $css .= '@media (max-width: 768px){.boxed{margin:'. aces_spacing_css_top_bottom( $top_margin, $right_margin, $bottom_margin, $left_margin ) .'}}'; } // Mobile top bar margin if ( isset( $mobile_top_margin ) && '' != $mobile_top_margin || isset( $mobile_bottom_margin ) && '' != $mobile_bottom_margin ) { $css .= '@media (max-width: 480px){.boxed{margin:'. aces_spacing_css_top_bottom( $top_margin, $right_margin, $bottom_margin, $left_margin) .'}}'; } } //layout $top_padding = get_theme_mod( 'aces_site_container_top_padding' ); $right_padding = get_theme_mod( 'aces_site_container_right_padding' ); $bottom_padding = get_theme_mod( 'aces_site_container_bottom_padding' ); $left_padding = get_theme_mod( 'aces_site_container_left_padding'); $tablet_top_padding = get_theme_mod( 'aces_site_container_tablet_top_padding' ); $tablet_right_padding = get_theme_mod( 'aces_site_container_tablet_right_padding' ); $tablet_bottom_padding = get_theme_mod( 'aces_site_container_tablet_bottom_padding' ); $tablet_left_padding = get_theme_mod( 'aces_site_container_tablet_left_padding' ); $mobile_top_padding = get_theme_mod( 'aces_site_container_mobile_top_padding' ); $mobile_right_padding = get_theme_mod( 'aces_site_container_mobile_right_padding' ); $mobile_bottom_padding = get_theme_mod( 'aces_site_container_mobile_bottom_padding' ); $mobile_left_padding = get_theme_mod( 'aces_site_container_mobile_left_padding' ); // Top bar padding if ( isset( $top_padding ) && '' != $top_padding && '' != $top_padding || isset( $right_padding ) && '' != $right_padding && '' != $right_padding || isset( $bottom_padding ) && '' != $bottom_padding && '' != $bottom_padding || isset( $left_padding ) && '' != $left_padding && '' != $left_padding ) { $css .= '.container{padding:'. aces_spacing_css( $top_padding, $right_padding, $bottom_padding, $left_padding ) .'}'; } // Tablet top bar padding if ( isset( $tablet_top_padding ) && '' != $tablet_top_padding || isset( $tablet_right_padding ) && '' != $tablet_right_padding || isset( $tablet_bottom_padding ) && '' != $tablet_bottom_padding || isset( $tablet_left_padding ) && '' != $tablet_left_padding ) { $css .= '@media (max-width: 768px){.container{padding:'. aces_spacing_css( $tablet_top_padding, $tablet_right_padding, $tablet_bottom_padding, $tablet_left_padding ) .'}}'; } // Mobile top bar padding if ( isset( $mobile_top_padding ) && '' != $mobile_top_padding || isset( $mobile_right_padding ) && '' != $mobile_right_padding || isset( $mobile_bottom_padding ) && '' != $mobile_bottom_padding || isset( $mobile_left_padding ) && '' != $mobile_left_padding ) { $css .= '@media (max-width: 480px){.container{padding:'. aces_spacing_css( $mobile_top_padding, $mobile_right_padding, $mobile_bottom_padding, $mobile_left_padding ) .'}}'; } //Typography $enable_global_typo = get_theme_mod( 'aces_global_body_typo_enable'); $font_family = get_theme_mod( 'aces_global_body_font_family' ); $body_d_font_size = get_theme_mod( 'aces_body_desktop_typography_font_size' ); $body_t_font_size = get_theme_mod( 'aces_body_tablet_typography_font_size' ); $body_m_font_size = get_theme_mod( 'aces_body_mobile_typography_font_size' ); if ( ! empty( $enable_global_typo && $enable_global_typo== true) ) : if ( ! empty( $font_family ) ) { $css .= 'body, .page-header .page-title, .comments-title, .aces-comment-meta-wrap .aces-comment-cite-wrap b.fn, .aces-comment-meta-wrap .aces-comment-cite-wrap b.fn a, button, input, select, optgroup, textarea{font-family:'. $font_family .';}'; } if ( ! empty( $body_d_font_size ) ) { $css .= 'body, .page-content, .entry-content, .entry-summary{font-size:'. $body_d_font_size .'px;}'; } if ( ! empty( $body_t_font_size ) ) { $css .= '@media (max-width: 768px){ body, .page-content, .entry-content, .entry-summary{font-size:'. $body_t_font_size .'px;} }'; } if ( ! empty( $body_m_font_size ) ) { $css .= '@media (max-width: 480px){ body, .page-content, .entry-content, .entry-summary{font-size:'. $body_m_font_size .'px;}}'; } $global_font_weight = get_theme_mod( 'aces_typography_global_font_weight' ); $global_text_transform = get_theme_mod( 'aces_typography_global_text_transform' ); $global_line_height = get_theme_mod( 'aces_typography_global_line_height' ); $global_t_line_height = get_theme_mod( 'aces_typography_global_tablet_line_height' ); $global_m_line_height = get_theme_mod( 'aces_typography_global_mobile_line_height' ); if ( ! empty( $global_font_weight ) ) { $css .= 'body, .page-content, .entry-content, .entry-summary{font-weight:'. $global_font_weight .';}'; } if ( ! empty( $global_text_transform ) ) { $css .= 'body, .page-content, .entry-content, .entry-summary{text-transform:'. $global_text_transform .';}'; } if ( ! empty( $global_line_height ) ) { $css .= 'body, .page-content, .entry-content, .entry-summary, .entry-content p, .entry-content li{line-height:'. $global_line_height .'em;}'; } if ( ! empty( $global_t_line_height ) ) { $css .= '@media (max-width: 768px){ body, .page-content, .entry-content, .entry-summary, .entry-content p, .entry-content li{line-height:'. $global_t_line_height .'em;}}'; } if ( ! empty( $global_m_line_height ) ) { $css .= '@media (max-width: 480px){ body, .page-content, .entry-content, .entry-summary, .entry-content p, .entry-content li{line-height:'. $global_m_line_height .'em;}}'; } $global_letter_spacing = get_theme_mod( 'aces_typography_global_letter_spacing' ); $global_t_letter_spacing = get_theme_mod( 'aces_typography_global_tablet_letter_spacing' ); $global_m_letter_spacing = get_theme_mod( 'aces_typography_global_mobile_letter_spacing' ); if ( ! empty( $global_letter_spacing ) ) { $css .= 'body, .page-content, .entry-content, .entry-summary{letter-spacing:'. $global_letter_spacing .'px;}'; } if ( ! empty( $global_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ body, .page-content, .entry-content, .entry-summary{letter-spacing:'. $global_t_letter_spacing .'px;}}'; } if ( ! empty( $global_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ body, .page-content, .entry-content, .entry-summary{letter-spacing:'. $global_m_letter_spacing .'px;}}'; } endif; // Headings $enable_global_all_heading_typo = get_theme_mod( 'aces_global_typo_all_heading_enable'); if ( ! empty( $enable_global_all_heading_typo && $enable_global_all_heading_typo== true) ) : $all_heading_font_family = get_theme_mod( 'aces_global_all_heading_font_family' ); $all_heading_font_weight = get_theme_mod( 'aces_all_heading_typography_global_font_weight' ); $all_heading_text_transform = get_theme_mod( 'aces_all_heading_typography_global_text_transform' ); $all_heading_line_height = get_theme_mod( 'aces_all_heading_typography_global_line_height' ); $all_heading_t_line_height = get_theme_mod( 'aces_all_heading_typography_global_tablet_line_height' ); $all_heading_m_line_height = get_theme_mod( 'aces_all_heading_typography_global_mobile_line_height' ); $all_heading_letter_spacing = get_theme_mod( 'aces_all_heading_typography_global_letter_spacing' ); $all_heading_t_letter_spacing = get_theme_mod( 'aces_all_heading_typography_global_tablet_letter_spacing' ); $all_heading_m_letter_spacing = get_theme_mod( 'aces_all_heading_typography_global_mobile_letter_spacing' ); if ( ! empty( $all_heading_font_family ) ) { $css .= 'h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {font-family:'. $all_heading_font_family .';}'; } if ( ! empty( $all_heading_font_weight ) ) { $css .= 'h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {font-weight:'. $all_heading_font_weight .';}'; } if ( ! empty( $all_heading_text_transform ) ) { $css .= 'h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {text-transform:'. $all_heading_text_transform .';}'; } if ( ! empty( $all_heading_line_height ) ) { $css .= 'h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {line-height:'. $all_heading_line_height .';}'; } if ( ! empty( $all_heading_t_line_height ) ) { $css .= '@media (max-width: 768px){ h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6{line-height:'. $all_heading_t_line_height .';}}'; } if ( ! empty( $all_heading_m_line_height ) ) { $css .= '@media (max-width: 480px){ h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6{line-height:'. $all_heading_m_line_height .';}}'; } if ( ! empty( $all_heading_letter_spacing ) ) { $css .= 'h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6{letter-spacing:'. $all_heading_letter_spacing .'em;}'; } if ( ! empty( $all_heading_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6{letter-spacing:'. $all_heading_t_letter_spacing .'em;}}'; } if ( ! empty( $all_heading_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6{letter-spacing:'. $all_heading_m_letter_spacing .'em;}}'; } endif; // Headings $enable_global_h1_typo = get_theme_mod( 'aces_global_typo_h1_enable'); if ( ! empty( $enable_global_h1_typo && $enable_global_h1_typo == true) ) : // Headings $h1_d_font_size = get_theme_mod( 'aces_h1_desktop_typography_font_size' ); $h1_t_font_size = get_theme_mod( 'aces_h1_tablet_typography_font_size' ); $h1_m_font_size = get_theme_mod( 'aces_h1_mobile_typography_font_size' ); if ( ! empty( $h1_d_font_size ) ) { $css .= 'h1, .h1{font-size:'. $h1_d_font_size .'px;}'; } if ( ! empty( $h1_t_font_size ) ) { $css .= '@media (max-width: 768px){ h1, .h1{font-size:'. $h1_t_font_size .'px;} }'; } if ( ! empty( $h1_m_font_size ) ) { $css .= '@media (max-width: 480px){ h1, .h1{font-size:'. $h1_m_font_size .'px;}}'; } $h1_font_weight = get_theme_mod( 'aces_h1_typography_global_font_weight' ); $h1_text_transform = get_theme_mod( 'aces_h1_typography_global_text_transform' ); if ( ! empty( $h1_font_weight ) ) { $css .= 'h1, .h1{font-weight:'. $h1_font_weight .';}'; } if ( ! empty( $h1_text_transform ) ) { $css .= 'h1, .h1{text-transform:'. $h1_text_transform .';}'; } $h1_line_height = get_theme_mod( 'aces_h1_typography_global_line_height' ); $h1_t_line_height = get_theme_mod( 'aces_h1_typography_global_tablet_line_height' ); $h1_m_line_height = get_theme_mod( 'aces_h1_typography_global_mobile_line_height' ); if ( ! empty( $h1_line_height ) ) { $css .= 'h1, .h1 {line-height:'. $h1_line_height .';}'; } if ( ! empty( $h1_t_line_height ) ) { $css .= '@media (max-width: 768px){ h1, .h1{line-height:'. $h1_t_line_height .';}}'; } if ( ! empty( $h1_m_line_height ) ) { $css .= '@media (max-width: 480px){ h1, .h1{line-height:'. $h1_m_line_height .';}}'; } $h1_letter_spacing = get_theme_mod( 'aces_h1_typography_global_letter_spacing' ); $h1_t_letter_spacing = get_theme_mod( 'aces_h1_typography_global_tablet_letter_spacing' ); $h1_m_letter_spacing = get_theme_mod( 'aces_h1_typography_global_mobile_letter_spacing' ); if ( ! empty( $h1_letter_spacing ) ) { $css .= 'h1, .h1{letter-spacing:'. $h1_letter_spacing .'em;}'; } if ( ! empty( $h1_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ h1, .h1{letter-spacing:'. $h1_t_letter_spacing .'em;}}'; } if ( ! empty( $h1_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ h1, .h1{letter-spacing:'. $h1_m_letter_spacing .'em;}}'; } endif; // Headings $enable_global_h2_typo = get_theme_mod( 'aces_global_typo_h2_enable'); if ( ! empty( $enable_global_h2_typo && $enable_global_h2_typo== true) ) : // Headings $h2_d_font_size = get_theme_mod( 'aces_h2_desktop_typography_font_size' ); $h2_t_font_size = get_theme_mod( 'aces_h2_tablet_typography_font_size' ); $h2_m_font_size = get_theme_mod( 'aces_h2_mobile_typography_font_size' ); if ( ! empty( $h2_d_font_size ) ) { $css .= 'h2, .h2{font-size:'. $h2_d_font_size .'px;}'; } if ( ! empty( $h2_t_font_size ) ) { $css .= '@media (max-width: 768px){ h2, .h2{font-size:'. $h2_t_font_size .'px;} }'; } if ( ! empty( $h2_m_font_size ) ) { $css .= '@media (max-width: 480px){ h2, .h2{font-size:'. $h2_m_font_size .'px;}}'; } $h2_font_weight = get_theme_mod( 'aces_h2_typography_global_font_weight' ); $h2_text_transform = get_theme_mod( 'aces_h2_typography_global_text_transform' ); if ( ! empty( $h2_font_weight ) ) { $css .= 'h2, .h2{font-weight:'. $h2_font_weight .';}'; } if ( ! empty( $h2_text_transform ) ) { $css .= 'h2, .h2{text-transform:'. $h2_text_transform .';}'; } $h2_line_height = get_theme_mod( 'aces_h2_typography_global_line_height' ); $h2_t_line_height = get_theme_mod( 'aces_h2_typography_global_tablet_line_height' ); $h2_m_line_height = get_theme_mod( 'aces_h2_typography_global_mobile_line_height' ); if ( ! empty( $h2_line_height ) ) { $css .= 'h2, .h2 {line-height:'. $h2_line_height .';}'; } if ( ! empty( $h2_t_line_height ) ) { $css .= '@media (max-width: 768px){ h2, .h2{line-height:'. $h2_t_line_height .';}}'; } if ( ! empty( $h2_m_line_height ) ) { $css .= '@media (max-width: 480px){ h2, .h2{line-height:'. $h2_m_line_height .';}}'; } $h2_letter_spacing = get_theme_mod( 'aces_h2_typography_global_letter_spacing' ); $h2_t_letter_spacing = get_theme_mod( 'aces_h2_typography_global_tablet_letter_spacing' ); $h2_m_letter_spacing = get_theme_mod( 'aces_h2_typography_global_mobile_letter_spacing' ); if ( ! empty( $h2_letter_spacing ) ) { $css .= 'h2, .h2{letter-spacing:'. $h2_letter_spacing .'em;}'; } if ( ! empty( $h2_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ h2, .h2{letter-spacing:'. $h2_t_letter_spacing .'em;}}'; } if ( ! empty( $h2_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ h2, .h2{letter-spacing:'. $h2_m_letter_spacing .'em;}}'; } endif; // Headings $enable_global_h3_typo = get_theme_mod( 'aces_global_typo_h3_enable'); if ( ! empty( $enable_global_h3_typo && $enable_global_h3_typo== true) ) : // Headings $h3_d_font_size = get_theme_mod( 'aces_h3_desktop_typography_font_size' ); $h3_t_font_size = get_theme_mod( 'aces_h3_tablet_typography_font_size' ); $h3_m_font_size = get_theme_mod( 'aces_h3_mobile_typography_font_size' ); if ( ! empty( $h3_d_font_size ) ) { $css .= 'h3, .h3{font-size:'. $h3_d_font_size .'px;}'; } if ( ! empty( $h3_t_font_size ) ) { $css .= '@media (max-width: 768px){ h3, .h3{font-size:'. $h3_t_font_size .'px;} }'; } if ( ! empty( $h3_m_font_size ) ) { $css .= '@media (max-width: 480px){ h3, .h3{font-size:'. $h3_m_font_size .'px;}}'; } $h3_font_weight = get_theme_mod( 'aces_h3_typography_global_font_weight' ); $h3_text_transform = get_theme_mod( 'aces_h3_typography_global_text_transform' ); if ( ! empty( $h3_font_weight ) ) { $css .= 'h3, .h3{font-weight:'. $h3_font_weight .';}'; } if ( ! empty( $h3_text_transform ) ) { $css .= 'h3, .h3{text-transform:'. $h3_text_transform .';}'; } $h3_line_height = get_theme_mod( 'aces_h3_typography_global_line_height' ); $h3_t_line_height = get_theme_mod( 'aces_h3_typography_global_tablet_line_height' ); $h3_m_line_height = get_theme_mod( 'aces_h3_typography_global_mobile_line_height' ); if ( ! empty( $h3_line_height ) ) { $css .= 'h3, .h3 {line-height:'. $h3_line_height .';}'; } if ( ! empty( $h3_t_line_height ) ) { $css .= '@media (max-width: 768px){ h3, .h3{line-height:'. $h3_t_line_height .';}}'; } if ( ! empty( $h3_m_line_height ) ) { $css .= '@media (max-width: 480px){ h3, .h3{line-height:'. $h3_m_line_height .';}}'; } $h3_letter_spacing = get_theme_mod( 'aces_h3_typography_global_letter_spacing' ); $h3_t_letter_spacing = get_theme_mod( 'aces_h3_typography_global_tablet_letter_spacing' ); $h3_m_letter_spacing = get_theme_mod( 'aces_h3_typography_global_mobile_letter_spacing' ); if ( ! empty( $h3_letter_spacing ) ) { $css .= 'h3, .h3{letter-spacing:'. $h3_letter_spacing .'em;}'; } if ( ! empty( $h3_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ h3, .h3{letter-spacing:'. $h3_t_letter_spacing .'em;}}'; } if ( ! empty( $h3_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ h3, .h3{letter-spacing:'. $h3_m_letter_spacing .'em;}}'; } endif; // Headings $enable_global_h4_typo = get_theme_mod( 'aces_global_typo_h4_enable'); if ( ! empty( $enable_global_h4_typo && $enable_global_h4_typo== true) ) : // Headings $h4_d_font_size = get_theme_mod( 'aces_h4_desktop_typography_font_size' ); $h4_t_font_size = get_theme_mod( 'aces_h4_tablet_typography_font_size' ); $h4_m_font_size = get_theme_mod( 'aces_h4_mobile_typography_font_size' ); if ( ! empty( $h4_d_font_size ) ) { $css .= 'h4, .h4{font-size:'. $h4_d_font_size .'px;}'; } if ( ! empty( $h4_t_font_size ) ) { $css .= '@media (max-width: 768px){ h4, .h4{font-size:'. $h4_t_font_size .'px;} }'; } if ( ! empty( $h4_m_font_size ) ) { $css .= '@media (max-width: 480px){ h4, .h4{font-size:'. $h4_m_font_size .'px;}}'; } $h4_font_weight = get_theme_mod( 'aces_h4_typography_global_font_weight' ); $h4_text_transform = get_theme_mod( 'aces_h4_typography_global_text_transform' ); if ( ! empty( $h4_font_weight ) ) { $css .= 'h4, .h4{font-weight:'. $h4_font_weight .';}'; } if ( ! empty( $h4_text_transform ) ) { $css .= 'h4, .h4{text-transform:'. $h4_text_transform .';}'; } $h4_line_height = get_theme_mod( 'aces_h4_typography_global_line_height' ); $h4_t_line_height = get_theme_mod( 'aces_h4_typography_global_tablet_line_height' ); $h4_m_line_height = get_theme_mod( 'aces_h4_typography_global_mobile_line_height' ); if ( ! empty( $h4_line_height ) ) { $css .= 'h4, .h4 {line-height:'. $h4_line_height .';}'; } if ( ! empty( $h4_t_line_height ) ) { $css .= '@media (max-width: 768px){ h4, .h4{line-height:'. $h4_t_line_height .';}}'; } if ( ! empty( $h4_m_line_height ) ) { $css .= '@media (max-width: 480px){ h4, .h4{line-height:'. $h4_m_line_height .';}}'; } $h4_letter_spacing = get_theme_mod( 'aces_h4_typography_global_letter_spacing' ); $h4_t_letter_spacing = get_theme_mod( 'aces_h4_typography_global_tablet_letter_spacing' ); $h4_m_letter_spacing = get_theme_mod( 'aces_h4_typography_global_mobile_letter_spacing' ); if ( ! empty( $h4_letter_spacing ) ) { $css .= 'h4, .h4{letter-spacing:'. $h4_letter_spacing .'em;}'; } if ( ! empty( $h4_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ h4, .h4{letter-spacing:'. $h4_t_letter_spacing .'em;}}'; } if ( ! empty( $h4_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ h4, .h4{letter-spacing:'. $h4_m_letter_spacing .'em;}}'; } endif; // Headings $enable_global_h5_typo = get_theme_mod( 'aces_global_typo_h5_enable'); if ( ! empty( $enable_global_h5_typo && $enable_global_h5_typo== true) ) : // Headings $h5_d_font_size = get_theme_mod( 'aces_h5_desktop_typography_font_size' ); $h5_t_font_size = get_theme_mod( 'aces_h5_tablet_typography_font_size' ); $h5_m_font_size = get_theme_mod( 'aces_h5_mobile_typography_font_size' ); if ( ! empty( $h5_d_font_size ) ) { $css .= 'h5, .h5{font-size:'. $h5_d_font_size .'px;}'; } if ( ! empty( $h5_t_font_size ) ) { $css .= '@media (max-width: 768px){ h5, .h5{font-size:'. $h5_t_font_size .'px;} }'; } if ( ! empty( $h5_m_font_size ) ) { $css .= '@media (max-width: 480px){ h5, .h5{font-size:'. $h5_m_font_size .'px;}}'; } $h5_font_weight = get_theme_mod( 'aces_h5_typography_global_font_weight' ); $h5_text_transform = get_theme_mod( 'aces_h5_typography_global_text_transform' ); if ( ! empty( $h5_font_weight ) ) { $css .= 'h5, .h5{font-weight:'. $h5_font_weight .';}'; } if ( ! empty( $h5_text_transform ) ) { $css .= 'h5, .h5{text-transform:'. $h5_text_transform .';}'; } $h5_line_height = get_theme_mod( 'aces_h5_typography_global_line_height' ); $h5_t_line_height = get_theme_mod( 'aces_h5_typography_global_tablet_line_height' ); $h5_m_line_height = get_theme_mod( 'aces_h5_typography_global_mobile_line_height' ); if ( ! empty( $h5_line_height ) ) { $css .= 'h5, .h5 {line-height:'. $h5_line_height .';}'; } if ( ! empty( $h5_t_line_height ) ) { $css .= '@media (max-width: 768px){ h5, .h5{line-height:'. $h5_t_line_height .';}}'; } if ( ! empty( $h5_m_line_height ) ) { $css .= '@media (max-width: 480px){ h5, .h5{line-height:'. $h5_m_line_height .';}}'; } $h5_letter_spacing = get_theme_mod( 'aces_h5_typography_global_letter_spacing' ); $h5_t_letter_spacing = get_theme_mod( 'aces_h5_typography_global_tablet_letter_spacing' ); $h5_m_letter_spacing = get_theme_mod( 'aces_h5_typography_global_mobile_letter_spacing' ); if ( ! empty( $h5_letter_spacing ) ) { $css .= 'h5, .h5{letter-spacing:'. $h5_letter_spacing .'em;}'; } if ( ! empty( $h5_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ h5, .h5{letter-spacing:'. $h5_t_letter_spacing .'em;}}'; } if ( ! empty( $h5_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ h5, .h5{letter-spacing:'. $h5_m_letter_spacing .'em;}}'; } endif; // Headings $enable_global_h6_typo = get_theme_mod( 'aces_global_typo_h6_enable'); if ( ! empty( $enable_global_h6_typo && $enable_global_h6_typo== true) ) : // Headings $h6_d_font_size = get_theme_mod( 'aces_h6_desktop_typography_font_size' ); $h6_t_font_size = get_theme_mod( 'aces_h6_tablet_typography_font_size' ); $h6_m_font_size = get_theme_mod( 'aces_h6_mobile_typography_font_size' ); if ( ! empty( $h6_d_font_size ) ) { $css .= 'h6, .h6{font-size:'. $h6_d_font_size .'px;}'; } if ( ! empty( $h6_t_font_size ) ) { $css .= '@media (max-width: 768px){ h6, .h6{font-size:'. $h6_t_font_size .'px;} }'; } if ( ! empty( $h6_m_font_size ) ) { $css .= '@media (max-width: 480px){ h6, .h6{font-size:'. $h6_m_font_size .'px;}}'; } $h6_font_weight = get_theme_mod( 'aces_h6_typography_global_font_weight' ); $h6_text_transform = get_theme_mod( 'aces_h6_typography_global_text_transform' ); if ( ! empty( $h6_font_weight ) ) { $css .= 'h6, .h6{font-weight:'. $h6_font_weight .';}'; } if ( ! empty( $h6_text_transform ) ) { $css .= 'h6, .h6{text-transform:'. $h6_text_transform .';}'; } $h6_line_height = get_theme_mod( 'aces_h6_typography_global_line_height' ); $h6_t_line_height = get_theme_mod( 'aces_h6_typography_global_tablet_line_height' ); $h6_m_line_height = get_theme_mod( 'aces_h6_typography_global_mobile_line_height' ); if ( ! empty( $h6_line_height ) ) { $css .= 'h6, .h6 {line-height:'. $h6_line_height .';}'; } if ( ! empty( $h6_t_line_height ) ) { $css .= '@media (max-width: 768px){ h6, .h6{line-height:'. $h6_t_line_height .';}}'; } if ( ! empty( $h6_m_line_height ) ) { $css .= '@media (max-width: 480px){ h6, .h6{line-height:'. $h6_m_line_height .';}}'; } $h6_letter_spacing = get_theme_mod( 'aces_h6_typography_global_letter_spacing' ); $h6_t_letter_spacing = get_theme_mod( 'aces_h6_typography_global_tablet_letter_spacing' ); $h6_m_letter_spacing = get_theme_mod( 'aces_h6_typography_global_mobile_letter_spacing' ); if ( ! empty( $h6_letter_spacing ) ) { $css .= 'h6, .h6{letter-spacing:'. $h6_letter_spacing .'em;}'; } if ( ! empty( $h6_t_letter_spacing ) ) { $css .= '@media (max-width: 768px){ h6, .h6{letter-spacing:'. $h6_t_letter_spacing .'em;}}'; } if ( ! empty( $h6_m_letter_spacing ) ) { $css .= '@media (max-width: 480px){ h6, .h6{letter-spacing:'. $h6_m_letter_spacing .'em;}}'; } endif; //buttons $button_text_color = get_theme_mod( 'aces_global_button_text_color' ); $button_text_hover_color = get_theme_mod( 'aces_global_button_hover_text_color' ); $button_bg_color = get_theme_mod( 'aces_global_button_bg_color' ); $button_bg_hover_color = get_theme_mod( 'aces_global_button_hover_bg_color' ); $button_border_radius = get_theme_mod( 'aces_theme_button_border_radius' ); $button_border_size = get_theme_mod( 'aces_theme_button_border_size' ); $button_border_color = get_theme_mod( 'aces_theme_button_border_color' ); if ( ! empty( $button_text_color ) ) { $css .= '.form-submit input[type=submit], .widget input[type=submit], .search-form input[type=submit], .entry-content input[type=submit]{color:'. $button_text_color .';}'; } if ( ! empty( $button_text_hover_color ) ) { $css .= '.search-form .search-submit:focus, .search-form .search-submit:hover, button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover{color:'. $button_text_hover_color .';}'; } if ( ! empty( $button_bg_color ) ) { $css .= '.form-submit input[type=submit], .widget input[type=submit], .search-form input[type=submit], .entry-content input[type=submit]{background-color:'. $button_bg_color .';}'; } if ( ! empty( $button_bg_hover_color ) ) { $css .= '.search-form .search-submit:focus, .search-form .search-submit:hover, button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover{background-color:'. $button_bg_hover_color .';}'; } if ( ! empty( $button_border_radius ) ) { $css .= '.form-submit input[type=submit], .widget input[type=submit], .search-form input[type=submit], .entry-content input[type=submit]{border-radius:'. $button_border_radius .'px;}'; } if ( ! empty( $button_border_size ) && ! empty( $button_border_color ) ) { $css .= 'button, input[type="button"], input[type="reset"], input[type="submit"]{border:'.$button_border_size.'px solid'. $button_border_color .';}'; } //button padding $button_top_padding = get_theme_mod( 'aces_theme_button_top_padding' ); $button_right_padding = get_theme_mod( 'aces_theme_button_right_padding' ); $button_bottom_padding = get_theme_mod( 'aces_theme_button_bottom_padding' ); $button_left_padding = get_theme_mod( 'aces_theme_button_left_padding'); $button_tablet_top_padding = get_theme_mod( 'aces_theme_button_tablet_top_padding' ); $button_tablet_right_padding = get_theme_mod( 'aces_theme_button_tablet_right_padding' ); $button_tablet_bottom_padding = get_theme_mod( 'aces_theme_button_tablet_bottom_padding' ); $button_tablet_left_padding = get_theme_mod( 'aces_theme_button_tablet_left_padding' ); $button_mobile_top_padding = get_theme_mod( 'aces_theme_button_mobile_top_padding' ); $button_mobile_right_padding = get_theme_mod( 'aces_theme_button_mobile_right_padding' ); $button_mobile_bottom_padding = get_theme_mod( 'aces_theme_button_mobile_bottom_padding' ); $button_mobile_left_padding = get_theme_mod( 'aces_theme_button_mobile_left_padding' ); // Top bar padding if ( isset( $button_top_padding ) && '' != $button_top_padding && '' != $button_top_padding || isset( $button_right_padding ) && '' != $button_right_padding && '' != $button_right_padding || isset( $button_bottom_padding ) && '' != $button_bottom_padding && '' != $button_bottom_padding || isset( $button_left_padding ) && '' != $button_left_padding && '' != $button_left_padding ) { $css .= '.form-submit input[type=submit], .widget input[type=submit], .search-form input[type=submit], .entry-content input[type=submit]{padding:'. aces_spacing_css( $button_top_padding, $button_right_padding, $button_bottom_padding, $button_left_padding ) .'}'; } // Tablet top bar padding if ( isset( $button_tablet_top_padding ) && '' != $button_tablet_top_padding || isset( $button_tablet_right_padding ) && '' != $button_tablet_right_padding || isset( $button_tablet_bottom_padding ) && '' != $button_tablet_bottom_padding || isset( $button_tablet_left_padding ) && '' != $button_tablet_left_padding ) { $css .= '@media (max-width: 768px){.form-submit input[type=submit], .widget input[type=submit], .search-form input[type=submit], .entry-content input[type=submit]{padding:'. aces_spacing_css( $button_tablet_top_padding, $button_tablet_right_padding, $button_tablet_bottom_padding, $button_tablet_left_padding ) .'}}'; } // Mobile top bar padding if ( isset( $button_mobile_top_padding ) && '' != $button_mobile_top_padding || isset( $button_mobile_right_padding ) && '' != $button_mobile_right_padding || isset( $button_mobile_bottom_padding ) && '' != $button_mobile_bottom_padding || isset( $button_mobile_left_padding ) && '' != $button_mobile_left_padding ) { $css .= '@media (max-width: 480px){.form-submit input[type=submit], .widget input[type=submit], .search-form input[type=submit], .entry-content input[type=submit]{padding:'. aces_spacing_css( $button_mobile_top_padding, $button_mobile_right_padding, $button_mobile_bottom_padding, $button_mobile_left_padding ) .'}}'; } //breadcrumb $breadcrumb_enable = get_theme_mod( 'aces_global_breadcrumb_enable', true ); $breadcrumb_bg_color = get_theme_mod( 'aces_breadcrumb_bg_color' ); $breadcrumb_text_color = get_theme_mod( 'aces_breadcrumb_text_color' ); $breadcrumb_link = get_theme_mod( 'aces_breadcrumb_link_color' ); $breadcrumb_link_hover = get_theme_mod( 'aces_breadcrumb_hover_link_color' ); $breadcrumb_seperator_color = get_theme_mod( 'aces_breadcrumb_seperator_color' ); $breadcrumb_seperator_spacing = get_theme_mod( 'aces_breadcrumb_separator_spacing' ); if ( ! empty( $breadcrumb_enable && $breadcrumb_enable == true) ) : if ( ! empty( $breadcrumb_bg_color ) ) { $css .= '.aces-banner{background-color:'. $breadcrumb_bg_color .';}'; } if ( ! empty( $breadcrumb_text_color ) ) { $css .= '.site-breadcrumbs ol li{color:'. $breadcrumb_text_color .';}'; } if ( ! empty( $breadcrumb_link ) ) { $css .= '.site-breadcrumbs ol li a{color:'. $breadcrumb_link .';}'; } if ( ! empty( $breadcrumb_link_hover ) ) { $css .= '.site-breadcrumbs ol li a:hover{color:'. $breadcrumb_link_hover .';}'; } if ( ! empty( $breadcrumb_seperator_color ) ) { $css .= '.site-breadcrumbs ol li .breadcrumb-sep{color:'. $breadcrumb_seperator_color .';}'; } if ( ! empty( $breadcrumb_seperator_spacing ) ) { $css .= '.site-breadcrumbs ol li .breadcrumb-sep{margin:'. $breadcrumb_seperator_spacing .'px;}'; } endif; // Return CSS if ( ! empty( $css ) ) { $globalcss .= '/* Global CSS */'. $css; } // Return output css return $globalcss; } } endif; return new Aces_General_Customizer();