Astra_Ext_Header_Sections_Markup::add_fonts()
Enqueue Font Family
Description
Source
File: addons/header-sections/classes/class-astra-ext-header-sections-markup.php
public function add_fonts() { // Below Header. $below_header_enabled = $this->astra_below_header_enabled(); $above_header_enabled = $this->astra_above_header_enabled(); if ( ! $below_header_enabled && ! $above_header_enabled ) { return; } $font_family_primary = astra_get_option( 'font-family-below-header-primary-menu' ); $font_weight_primary = astra_get_option( 'font-weight-below-header-primary-menu' ); Astra_Fonts::add_font( $font_family_primary, $font_weight_primary ); $font_family_dropdown = astra_get_option( 'font-family-below-header-dropdown-menu' ); $font_weight_dropdown = astra_get_option( 'font-weight-below-header-dropdown-menu' ); Astra_Fonts::add_font( $font_family_dropdown, $font_weight_dropdown ); $font_family_content = astra_get_option( 'font-family-below-header-content' ); $font_weight_content = astra_get_option( 'font-weight-below-header-content' ); Astra_Fonts::add_font( $font_family_content, $font_weight_content ); // Above Header. $above_header_font_family = astra_get_option( 'above-header-font-family' ); $above_header_font_weight = astra_get_option( 'above-header-font-weight' ); Astra_Fonts::add_font( $above_header_font_family, $above_header_font_weight ); // Above Sub Menu Header. $above_header_sub_menu_font_family = astra_get_option( 'font-family-above-header-dropdown-menu' ); $above_header_sub_menu_font_weight = astra_get_option( 'font-weight-above-header-dropdown-menu' ); Astra_Fonts::add_font( $above_header_sub_menu_font_family, $above_header_sub_menu_font_weight ); }
Expand full source code Collapse full source code View on Trac