/** * Admin functions - Functions that add some functionality to WordPress admin panel * * @package Astra * @since 1.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Register menus */ if ( ! function_exists( 'astra_register_menu_locations' ) ) { /** * Register menus * * @since 1.0.0 */ function astra_register_menu_locations() { /** * Primary Menus */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'astra' ), ) ); if ( Astra_Builder_Helper::$is_header_footer_builder_active ) { /** * Register the Secondary & Mobile menus. */ register_nav_menus( array( 'secondary_menu' => __( 'Secondary Menu', 'astra' ), 'mobile_menu' => __( 'Mobile Menu', 'astra' ), ) ); $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_menu; for ( $index = 3; $index <= $component_limit; $index++ ) { if ( ! is_customize_preview() && ! Astra_Builder_Helper::is_component_loaded( 'menu-' . $index ) ) { continue; } register_nav_menus( array( 'menu_' . $index => __( 'Menu ', 'astra' ) . $index, ) ); } /** * Register the Account menus. */ register_nav_menus( array( 'loggedin_account_menu' => __( 'Logged In Account Menu', 'astra' ), ) ); } /** * Footer Menus */ register_nav_menus( array( 'footer_menu' => __( 'Footer Menu', 'astra' ), ) ); } } add_action( 'init', 'astra_register_menu_locations' );/** * Schema markup. * * @package Astra * @author Astra * @copyright Copyright (c) 2020, Astra * @link https://wpastra.com/ * @since Astra 2.1.3 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Astra CreativeWork Schema Markup. * * @since 2.1.3 */ class Astra_Organization_Schema extends Astra_Schema { /** * Setup schema * * @since 2.1.3 */ public function setup_schema() { if ( true !== $this->schema_enabled() ) { return false; } add_filter( 'astra_attr_site-identity', array( $this, 'organization_Schema' ) ); add_filter( 'astra_attr_site-title', array( $this, 'site_title_attr' ) ); add_filter( 'astra_attr_site-title-link', array( $this, 'site_title_link_attr' ) ); add_filter( 'astra_attr_site-title-custom-link', array( $this, 'site_title_custom_link_attr' ) ); add_filter( 'astra_attr_site-title-sticky-custom-link', array( $this, 'site_title_sticky_custom_link_attr' ) ); add_filter( 'astra_attr_site-title-none-sticky-custom-link', array( $this, 'site_title_none_sticky_custom_link_attr' ) ); add_filter( 'astra_attr_site-title-sticky-custom-logo-link', array( $this, 'site_title_sticky_custom_logo_link_attr' ) ); } /** * Update Schema markup attribute. * * @param array $attr An array of attributes. * * @return array Updated embed markup. */ public function organization_Schema( $attr ) { $attr['itemtype'] = 'https://schema.org/Organization'; $attr['itemscope'] = 'itemscope'; return $attr; } /** * Update Schema markup attribute. * * @param array $attr An array of attributes. * * @return array Updated embed markup. */ public function site_title_attr( $attr ) { $attr['itemprop'] = 'name'; return $attr; } /** * Update Schema markup attribute. * * @param array $attr An array of attributes. * * @return array Updated embed markup. */ public function site_title_link_attr( $attr ) { $attr['itemprop'] = 'url'; $attr['class'] = ''; return $attr; } /** * Update Schema markup attribute. * * @param array $attr An array of attributes. * * @return array Updated embed markup. */ public function site_title_custom_link_attr( $attr ) { $attr['itemprop'] = 'url'; $attr['class'] = ''; return $attr; } /** * Update Schema markup attribute. * * @param array $attr An array of attributes. * * @return array Updated embed markup. */ public function site_title_sticky_custom_link_attr( $attr ) { $attr['itemprop'] = 'url'; $attr['class'] = ''; return $attr; } /** * Update Schema markup attribute. * * @param array $attr An array of attributes. * * @return array Updated embed markup. */ public function site_title_none_sticky_custom_link_attr( $attr ) { $attr['itemprop'] = 'url'; $attr['class'] = ''; return $attr; } /** * Update Schema markup attribute. * * @param array $attr An array of attributes. * * @return array Updated embed markup. */ public function site_title_sticky_custom_logo_link_attr( $attr ) { $attr['itemprop'] = 'url'; $attr['class'] = ''; return $attr; } /** * Enabled schema * * @since 2.1.3 */ protected function schema_enabled() { return apply_filters( 'astra_organization_schema_enabled', parent::schema_enabled() ); } } new Astra_Organization_Schema(); /*! * Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ @font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:Font Awesome\ 5 Free;font-weight:900}/** * Heading Colors Loader for Astra theme. * * @package Astra * @author Brainstorm Force * @copyright Copyright (c) 2020, Brainstorm Force * @link https://www.brainstormforce.com * @since Astra 2.2.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 2.2.0 */ class Astra_Heading_Colors_Loader { /** * Constructor * * @since 2.2.0 */ public function __construct() { add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_register', array( $this, 'customize_register' ), 2 ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); // Load Google fonts. add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); } /** * Enqueue google fonts. * * @since 2.2.0 */ public function add_fonts() { $font_family_h1 = astra_get_option( 'font-family-h1' ); $font_weight_h1 = astra_get_option( 'font-weight-h1' ); Astra_Fonts::add_font( $font_family_h1, $font_weight_h1 ); $font_family_h2 = astra_get_option( 'font-family-h2' ); $font_weight_h2 = astra_get_option( 'font-weight-h2' ); Astra_Fonts::add_font( $font_family_h2, $font_weight_h2 ); $font_family_h3 = astra_get_option( 'font-family-h3' ); $font_weight_h3 = astra_get_option( 'font-weight-h3' ); Astra_Fonts::add_font( $font_family_h3, $font_weight_h3 ); $theme_btn_font_family = astra_get_option( 'font-family-button' ); $theme_btn_font_weight = astra_get_option( 'font-weight-button' ); Astra_Fonts::add_font( $theme_btn_font_family, $theme_btn_font_weight ); $header_btn_font_family = astra_get_option( 'primary-header-button-font-family' ); $header_btn_font_weight = astra_get_option( 'primary-header-button-font-weight' ); Astra_Fonts::add_font( $header_btn_font_family, $header_btn_font_weight ); } /** * Set Options Default Values * * @param array $defaults Astra options default value array. * @return array * * @since 2.2.0 */ public function theme_defaults( $defaults ) { /** * Heading Tags