File manager - Edit - /home/premiey/www/wp-includes/images/media/typography.tar
Back
class-astra-ext-typography.php 0000666 00000002457 15165520225 0012513 0 ustar 00 <?php /** * Typography Extension * * @package Astra Addon */ define( 'ASTRA_ADDON_EXT_TYPOGRAPHY_DIR', ASTRA_EXT_DIR . 'addons/typography/' ); define( 'ASTRA_ADDON_EXT_TYPOGRAPHY_URI', ASTRA_EXT_URI . 'addons/typography/' ); if ( ! class_exists( 'Astra_Ext_Typography' ) ) { /** * Typography Initial Setup * * @since 1.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Typography { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var object instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor function that initializes required actions and hooks */ public function __construct() { require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/class-astra-ext-typography-loader.php'; // Include front end files. if ( ! is_admin() ) { require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/dynamic.css.php'; } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_Typography::get_instance(); } index.php 0000666 00000000176 15165520225 0006377 0 ustar 00 <?php /** * Index file * * @package Astra Addon * @since Astra 1.0.0 */ /* Silence is golden, and we agree. */ classes/index.php 0000666 00000000176 15165520225 0010034 0 ustar 00 <?php /** * Index file * * @package Astra Addon * @since Astra 1.0.0 */ /* Silence is golden, and we agree. */ classes/sections/class-astra-builder-menu-configs.php 0000666 00000041005 15165520225 0017001 0 ustar 00 <?php /** * [Primary Menu] options for astra theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 3.0.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Builder_Menu_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Builder_Menu_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Primary Menu typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { /** * Header - Menu - Typography */ $html_config = array(); $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_section = 'section-hb-menu-' . $index; $_prefix = 'menu' . $index; $_configs = array( // Option Group: Primary SubMenu Typography. array( 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-sub-menu-typography]', 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Submenu Font', 'astra-addon' ), 'section' => $_section, 'priority' => 130, 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'design', ), ), ), // Option: Primary Submenu Font Family. array( 'name' => 'header-font-family-' . $_prefix . '-sub-menu', 'default' => astra_get_option( 'header-font-family-' . $_prefix . '-sub-menu' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-sub-menu-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'transport' => 'postMessage', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 28, 'connect' => 'header-font-weight-' . $_prefix . '-sub-menu', 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), // Option: Primary Submenu Font Weight. array( 'name' => 'header-font-weight-' . $_prefix . '-sub-menu', 'default' => astra_get_option( 'header-font-weight-' . $_prefix . '-sub-menu' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-sub-menu-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'transport' => 'postMessage', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 29, 'connect' => 'header-font-family-' . $_prefix . '-sub-menu', 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), // Option: Primary Submenu Font Size. array( 'name' => 'header-font-size-' . $_prefix . '-sub-menu', 'default' => astra_get_option( 'header-font-size-' . $_prefix . '-sub-menu' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-sub-menu-typography]', 'section' => $_section, 'type' => 'sub-control', 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'priority' => 30, 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), ), /** * Option: Primary Sub Menu Font Extras */ array( 'name' => 'header-font-extras-' . $_prefix . '-sub-menu', 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-sub-menu-typography]', 'section' => $_section, 'type' => 'sub-control', 'control' => 'ast-font-extras', 'priority' => 32, 'default' => astra_get_option( 'header-font-extras-' . $_prefix . '-sub-menu' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); $html_config[] = $_configs; if ( 3 > $index ) { $_configs = array( // Option Group: Primary Mega Menu col Typography. array( 'name' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-mega-menu-col-typography]', 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Mega Menu Heading', 'astra-addon' ), 'section' => $_section, 'priority' => 130, 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'design', ), ), ), // Option: Primary Megamenu Header Menu Font Family. array( 'name' => 'header-' . $_prefix . '-megamenu-heading-font-family', 'default' => astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-family' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-mega-menu-col-typography]', 'transport' => 'postMessage', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-megamenu-heading-font-weight]', 'priority' => 10, 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), // Option: Primary Megamenu Header Menu Font Weight. array( 'name' => 'header-' . $_prefix . '-megamenu-heading-font-weight', 'default' => astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-weight' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-mega-menu-col-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'header-' . $_prefix . '-megamenu-heading-font-family', 'priority' => 19, 'transport' => 'postMessage', 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), // Option: Primary Megamenu Header Menu Font Size. array( 'name' => 'header-' . $_prefix . '-megamenu-heading-font-size', 'default' => astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-size' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-mega-menu-col-typography]', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra-addon' ), 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-responsive-slider', 'priority' => 20, 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), ), /** * Option: Primary Menu Font Extras */ array( 'name' => 'header-' . $_prefix . '-megamenu-heading-font-extras', 'parent' => ASTRA_THEME_SETTINGS . '[header-' . $_prefix . '-mega-menu-col-typography]', 'section' => $_section, 'type' => 'sub-control', 'control' => 'ast-font-extras', 'priority' => 40, 'default' => astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-extras' ), 'title' => __( 'Font Extras', 'astra-addon' ), 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), ), ); $html_config[] = $_configs; } } /** * Footer - Menu - Typography */ $_section = 'section-footer-menu'; $html_config[] = array( // Option: Menu Font Family. array( 'name' => 'footer-menu-font-family', 'default' => astra_get_option( 'footer-menu-font-family' ), 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-typography]', 'type' => 'sub-control', 'section' => $_section, 'transport' => 'postMessage', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 22, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'connect' => 'footer-menu-font-weight', 'context' => astra_addon_builder_helper()->general_tab, ), // Option: Menu Font Weight. array( 'name' => 'footer-menu-font-weight', 'default' => astra_get_option( 'footer-menu-font-weight' ), 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-typography]', 'section' => $_section, 'type' => 'sub-control', 'control' => 'ast-font', 'transport' => 'postMessage', 'font_type' => 'ast-font-weight', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 22, 'connect' => 'footer-menu-font-family', 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Footer Content Font Extras */ array( 'name' => 'footer-menu-font-extras', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[footer-menu-typography]', 'control' => 'ast-font-extras', 'section' => $_section, 'priority' => 26, 'default' => astra_get_option( 'footer-menu-font-extras' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); /** * Mobile Menu - Typo. */ $html_config[] = array( // Option Group: Primary SubMenu Typography. array( 'name' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-sub-menu-typography]', 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Submenu Font', 'astra-addon' ), 'section' => 'section-header-mobile-menu', 'priority' => 130, 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'design', ), ), ), // Option: Primary Submenu Font Family. array( 'name' => 'header-font-family-mobile-menu-sub-menu', 'default' => astra_get_option( 'header-font-family-mobile-menu-sub-menu' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-sub-menu-typography]', 'type' => 'sub-control', 'section' => 'section-header-mobile-menu', 'control' => 'ast-font', 'transport' => 'postMessage', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 28, 'connect' => 'header-font-weight-mobile-menu-sub-menu', 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), // Option: Primary Submenu Font Weight. array( 'name' => 'header-font-weight-mobile-menu-sub-menu', 'default' => astra_get_option( 'header-font-weight-mobile-menu-sub-menu' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-sub-menu-typography]', 'type' => 'sub-control', 'section' => 'section-header-mobile-menu', 'control' => 'ast-font', 'transport' => 'postMessage', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 29, 'connect' => 'header-font-family-mobile-menu-sub-menu', 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), // Option: Primary Submenu Font Size. array( 'name' => 'header-font-size-mobile-menu-sub-menu', 'default' => astra_get_option( 'header-font-size-mobile-menu-sub-menu' ), 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-sub-menu-typography]', 'section' => 'section-header-mobile-menu', 'title' => __( 'Font Size', 'astra-addon' ), 'type' => 'sub-control', 'control' => 'ast-responsive-slider', 'transport' => 'postMessage', 'priority' => 29, 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'context' => array( array( 'setting' => 'ast_selected_tab', 'value' => 'general', ), ), ), /** * Option: Font Extras */ array( 'name' => 'font-extras-mobile-menu-sub-menu', 'parent' => ASTRA_THEME_SETTINGS . '[header-mobile-menu-sub-menu-typography]', 'section' => 'section-header-mobile-menu', 'type' => 'sub-control', 'control' => 'ast-font-extras', 'priority' => 29, 'default' => astra_get_option( 'font-extras-mobile-menu-sub-menu' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); $html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) ); $configurations = array_merge( $configurations, $html_config ); return $configurations; } } } new Astra_Builder_Menu_Configs(); classes/sections/class-astra-archive-advanced-typo-configs.php 0000666 00000025104 15165520225 0020570 0 ustar 00 <?php /** * Section [Archive] options for astra theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.0.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Archive_Advanced_Typo_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Archive_Advanced_Typo_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( array( 'name' => ASTRA_THEME_SETTINGS . '[blog-content-post-meta-typo]', 'default' => astra_get_option( 'blog-content-post-meta-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Meta Font', 'astra-addon' ), 'section' => 'section-blog', 'transport' => 'postMessage', 'priority' => 145, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), array( 'name' => ASTRA_THEME_SETTINGS . '[blog-content-pagination-typo]', 'default' => astra_get_option( 'blog-content-pagination-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Pagination Font', 'astra-addon' ), 'section' => 'section-blog', 'transport' => 'postMessage', 'priority' => 150, 'divider' => array( 'ast_class' => 'ast-bottom-spacing' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), array( 'name' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', 'default' => astra_get_option( 'blog-content-blog-post-title-typo' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Post Title Font', 'astra-addon' ), 'section' => 'section-blog', 'transport' => 'postMessage', 'priority' => 140, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option: Blog - Post Title Font Family */ array( 'name' => 'font-family-page-title', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', 'section' => 'section-blog', 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-page-title' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-page-title]', 'priority' => 1, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Blog - Post Title Font Weight */ array( 'name' => 'font-weight-page-title', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', 'section' => 'section-blog', 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'default' => astra_get_option( 'font-weight-page-title' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-page-title', 'priority' => 1, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Blog - Post Title Font Size */ array( 'name' => 'font-size-page-title', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', 'type' => 'sub-control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'section' => 'section-blog', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra-addon' ), 'priority' => 2, 'default' => astra_get_option( 'font-size-page-title' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Blog - Post Title Font Extras */ array( 'name' => 'font-extras-page-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-blog-post-title-typo]', 'control' => 'ast-font-extras', 'section' => 'section-blog', 'priority' => 30, 'default' => astra_get_option( 'font-extras-page-title' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), /** * Option: Post Meta Font Family */ array( 'name' => 'font-family-post-meta', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-post-meta-typo]', 'section' => 'section-blog', 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-post-meta' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-post-meta]', 'priority' => 5, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Post Meta Font Weight */ array( 'name' => 'font-weight-post-meta', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-post-meta-typo]', 'section' => 'section-blog', 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'default' => astra_get_option( 'font-weight-post-meta' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-post-meta', 'priority' => 5, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Post Meta Font Size */ array( 'name' => 'font-size-post-meta', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-post-meta-typo]', 'section' => 'section-blog', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'type' => 'sub-control', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra-addon' ), 'priority' => 5, 'default' => astra_get_option( 'font-size-post-meta' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Post Meta Font Extras */ array( 'name' => 'font-extras-post-meta', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-post-meta-typo]', 'control' => 'ast-font-extras', 'section' => 'section-blog', 'priority' => 7, 'default' => astra_get_option( 'font-extras-post-meta' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), /** * Option: Pagination Text Transform */ array( 'name' => 'text-transform-post-pagination', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-pagination-typo]', 'section' => 'section-blog', 'title' => __( 'Text Transform', 'astra-addon' ), 'default' => astra_get_option( 'text-transform-post-pagination' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'control' => 'ast-select', 'choices' => array( '' => __( 'Inherit', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), 'capitalize' => __( 'Capitalize', 'astra-addon' ), 'uppercase' => __( 'Uppercase', 'astra-addon' ), 'lowercase' => __( 'Lowercase', 'astra-addon' ), ), 'priority' => 6, 'divider' => array( 'ast_class' => 'ast-sub-top-dotted-divider' ), ), /** * Option: Pagination Font Size */ array( 'name' => 'font-size-post-pagination', 'parent' => ASTRA_THEME_SETTINGS . '[blog-content-pagination-typo]', 'type' => 'sub-control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'section' => 'section-blog', 'transport' => 'postMessage', 'title' => __( 'Font Size', 'astra-addon' ), 'priority' => 5, 'default' => astra_get_option( 'font-size-post-pagination' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), ); return array_merge( $configurations, $_configs ); } } } new Astra_Archive_Advanced_Typo_Configs(); classes/sections/class-astra-header-builder-typo-configs.php 0000666 00000070205 15165520225 0020262 0 ustar 00 <?php /** * [Primary Menu] options for astra theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 3.0.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Header_Builder_Typo_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Header_Builder_Typo_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Get the customizer defaults for font-extras control. * * @param string $font_extras_key Font extras key. * @param string $line_height_key Line height key. * @param string $text_transform_key Text transform key. * @return array * * @since 4.0.0 */ private function get_font_extras_default( $font_extras_key, $line_height_key, $text_transform_key ) { $astra_options = is_callable( 'Astra_Theme_Options::get_astra_options' ) ? Astra_Theme_Options::get_astra_options() : get_option( ASTRA_THEME_SETTINGS ); return array( 'line-height' => ! isset( $astra_options[ $font_extras_key ] ) && isset( $astra_options[ $line_height_key ] ) ? $astra_options[ $line_height_key ] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options[ $font_extras_key ] ) && isset( $astra_options[ $text_transform_key ] ) ? $astra_options[ $text_transform_key ] : '', 'text-decoration' => '', ); } /** * Get the configs for the typos. * * @param string $_section section id. * @param string $parent sub control parent. * @return array */ private function get_typo_configs( $_section, $parent ) { return array( /** * Option: Font Weight */ array( 'name' => 'font-weight-' . $_section, 'control' => 'ast-font', 'parent' => $parent, 'section' => $_section, 'font_type' => 'ast-font-weight', 'type' => 'sub-control', 'default' => astra_get_option( 'font-weight-' . $_section, 'inherit' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 14, 'connect' => 'font-family-' . $_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Family */ array( 'name' => 'font-family-' . $_section, 'type' => 'sub-control', 'parent' => $parent, 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-' . $_section, 'inherit' ), 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 13, 'connect' => 'font-weight-' . $_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Extras */ array( 'name' => 'font-extras-' . $_section, 'parent' => $parent, 'section' => $_section, 'type' => 'sub-control', 'control' => 'ast-font-extras', 'priority' => 17, 'default' => astra_get_option( 'font-extras-' . $_section, $this->get_font_extras_default( 'font-extras-' . $_section, 'line-height-' . $_section, 'text-transform-' . $_section ) ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); } /** * Get the widget configs for the typos by builder. * * @param string $_section section id. * @param string $_prefix sub control. * @return array */ private function get_widget_typo_configs_by_builder_type( $_section, $_prefix ) { return array( /** * Option: Header Widget Titles Font Family */ array( 'name' => $_prefix . '-font-family', 'default' => astra_get_option( $_prefix . '-font-family' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-text-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'context' => astra_addon_builder_helper()->general_tab, 'connect' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-font-weight]', 'priority' => 1, ), /** * Option: Header Widget Title Font Weight */ array( 'name' => $_prefix . '-font-weight', 'default' => astra_get_option( $_prefix . '-font-weight', 'inherit' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-text-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'title' => __( 'Font Weight', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'connect' => $_prefix . '-font-family', 'priority' => 3, 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Header widget title font extras */ array( 'name' => $_prefix . '-font-extras', 'default' => astra_get_option( $_prefix . '-font-extras', $this->get_font_extras_default( $_prefix . '-font-extras', $_prefix . '-line-height', $_prefix . '-text-transform' ) ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-text-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font-extras', 'priority' => 4, 'title' => __( 'Font Extras', 'astra-addon' ), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Header Widget Content Font Family */ array( 'name' => $_prefix . '-content-font-family', 'default' => astra_get_option( $_prefix . '-content-font-family' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-content-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'context' => astra_addon_builder_helper()->general_tab, 'connect' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-content-font-weight]', 'priority' => 1, ), /** * Option: Header Widget Content Font Weight */ array( 'name' => $_prefix . '-content-font-weight', 'default' => astra_get_option( $_prefix . '-content-font-weight', 'inherit' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-content-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'title' => __( 'Font Weight', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'connect' => $_prefix . '-content-font-family', 'priority' => 3, 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Header widget content font extras */ array( 'name' => $_prefix . '-content-font-extras', 'default' => astra_get_option( $_prefix . '-content-font-extras', $this->get_font_extras_default( $_prefix . '-content-font-extras', $_prefix . '-content-line-height', $_prefix . '-content-transform' ) ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_prefix . '-text-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font-extras', 'priority' => 4, 'title' => __( 'Font Extras', 'astra-addon' ), 'context' => astra_addon_builder_helper()->general_tab, ), ); } /** * Register Primary Menu typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 3.0.0 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { /** * Header - HTML - Typography */ $html_config = array(); $astra_has_widgets_block_editor = astra_addon_has_widgets_block_editor(); $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $html_config[] = $this->get_typo_configs( 'section-hb-html-' . $index, ASTRA_THEME_SETTINGS . '[section-hb-html-' . $index . '-typography]' ); $html_config[] = $this->get_typo_configs( 'section-fb-html-' . $index, ASTRA_THEME_SETTINGS . '[section-fb-html-' . $index . '-typography]' ); $html_config[] = $this->get_typo_configs( 'section-hb-social-icons-' . $index, ASTRA_THEME_SETTINGS . '[section-hb-social-icons-' . $index . '-typography]' ); $html_config[] = $this->get_typo_configs( 'section-fb-social-icons-' . $index, ASTRA_THEME_SETTINGS . '[section-fb-social-icons-' . $index . '-typography]' ); $header_section = ( ! $astra_has_widgets_block_editor ) ? 'sidebar-widgets-header-widget-' . $index : 'astra-sidebar-widgets-header-widget-' . $index; $footer_section = ( ! $astra_has_widgets_block_editor ) ? 'sidebar-widgets-footer-widget-' . $index : 'astra-sidebar-widgets-footer-widget-' . $index; $html_config[] = $this->get_widget_typo_configs_by_builder_type( $header_section, 'header-widget-' . $index ); $html_config[] = $this->get_widget_typo_configs_by_builder_type( $footer_section, 'footer-widget-' . $index ); } /** * Header - Mobile Trigger */ $_section = 'section-header-mobile-trigger'; $html_config[] = array( // Option: Trigger Font Family. array( 'name' => 'mobile-header-label-font-family', 'default' => astra_get_option( 'mobile-header-label-font-family' ), 'parent' => ASTRA_THEME_SETTINGS . '[mobile-header-label-typography]', 'type' => 'sub-control', 'section' => $_section, 'transport' => 'postMessage', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 22, 'connect' => 'mobile-header-label-font-weight', 'context' => astra_addon_builder_helper()->design_tab, ), // Option: Trigger Font Weight. array( 'name' => 'mobile-header-label-font-weight', 'default' => astra_get_option( 'mobile-header-label-font-weight', 'inherit' ), 'parent' => ASTRA_THEME_SETTINGS . '[mobile-header-label-typography]', 'section' => $_section, 'type' => 'sub-control', 'control' => 'ast-font', 'transport' => 'postMessage', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 24, 'connect' => 'mobile-header-label-font-family', 'context' => astra_addon_builder_helper()->design_tab, ), /** * Option: Font extras */ array( 'name' => 'mobile-header-label-font-extras', 'default' => astra_get_option( 'mobile-header-label-font-extras', $this->get_font_extras_default( 'mobile-header-label-font-extras', 'mobile-header-label-line-height', 'mobile-header-label-text-transform' ) ), 'parent' => ASTRA_THEME_SETTINGS . '[mobile-header-label-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font-extras', 'priority' => 25, 'title' => __( 'Font Extras', 'astra-addon' ), 'context' => astra_addon_builder_helper()->design_tab, ), ); /** * Footer - Copyright - Typography */ $_section = 'section-footer-copyright'; $parent = ASTRA_THEME_SETTINGS . '[' . $_section . '-typography]'; $html_config[] = array( /** * Option: Font Weight */ array( 'name' => 'font-weight-' . $_section, 'control' => 'ast-font', 'parent' => $parent, 'section' => $_section, 'font_type' => 'ast-font-weight', 'type' => 'sub-control', 'default' => astra_get_option( 'font-weight-' . $_section, 'inherit' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 14, 'connect' => 'font-family-' . $_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Family */ array( 'name' => 'font-family-' . $_section, 'type' => 'sub-control', 'parent' => $parent, 'section' => $_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-' . $_section ), 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 13, 'connect' => 'font-weight-' . $_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Extras */ array( 'name' => 'font-extras-' . $_section, 'type' => 'sub-control', 'parent' => $parent, 'control' => 'ast-font-extras', 'section' => $_section, 'priority' => 17, 'default' => astra_get_option( 'font-extras-' . $_section, $this->get_font_extras_default( 'font-extras-' . $_section, 'line-height-' . $_section, 'text-transform-' . $_section ) ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); /** * Header - Account - Typography */ $_section = 'section-header-account'; $parent = ASTRA_THEME_SETTINGS . '[' . $_section . '-typography]'; $html_config[] = $this->get_typo_configs( $_section, $parent ); $html_config[] = array( // Option Group: Menu Typography. array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-menu-typography]', 'default' => astra_get_option( $_section . '-menu-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Menu Font', 'astra-addon' ), 'section' => $_section, 'transport' => 'postMessage', 'divider' => array( 'ast_class' => 'ast-bottom-spacing' ), 'priority' => 22, 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-action-type]', 'operator' => '==', 'value' => 'menu', ), astra_addon_builder_helper()->design_tab_config, ), ), // Option: Menu Font Family. array( 'name' => $_section . '-menu-font-family', 'default' => astra_get_option( $_section . '-menu-font-family' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_section . '-menu-typography]', 'type' => 'sub-control', 'section' => $_section, 'transport' => 'postMessage', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'priority' => 22, 'connect' => $_section . '-menu-font-weight', 'context' => astra_addon_builder_helper()->general_tab, ), // Option: Menu Font Weight. array( 'name' => $_section . '-menu-font-weight', 'default' => astra_get_option( $_section . '-menu-font-weight', 'inherit' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_section . '-menu-typography]', 'section' => $_section, 'type' => 'sub-control', 'control' => 'ast-font', 'transport' => 'postMessage', 'font_type' => 'ast-font-weight', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 22, 'connect' => $_section . '-menu-font-family', 'context' => astra_addon_builder_helper()->general_tab, ), // Option: Menu Font Size. array( 'name' => $_section . '-menu-font-size', 'default' => astra_get_option( $_section . '-menu-font-size' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_section . '-menu-typography]', 'section' => $_section, 'type' => 'sub-control', 'priority' => 23, 'title' => __( 'Font Size', 'astra-addon' ), 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Font extras */ array( 'name' => $_section . '-menu-font-extras', 'default' => astra_get_option( $_section . '-menu-font-extras', $this->get_font_extras_default( $_section . '-menu-font-extras', $_section . '-menu-line-height', $_section . '-menu-text-transform' ) ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_section . '-menu-typography]', 'type' => 'sub-control', 'section' => $_section, 'control' => 'ast-font-extras', 'priority' => 25, 'title' => __( 'Font Extras', 'astra-addon' ), 'context' => astra_addon_builder_helper()->general_tab, ), /** * Option: Logged Out Popup text Typography */ array( 'name' => ASTRA_THEME_SETTINGS . '[' . $_section . '-popup-typography]', 'default' => astra_get_option( $_section . '-popup-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Login Popup Font', 'astra-addon' ), 'section' => $_section, 'transport' => 'postMessage', 'context' => array( astra_addon_builder_helper()->design_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[header-account-logout-action]', 'operator' => '==', 'value' => 'login', ), ), 'priority' => 22, ), // Option: Menu Font Size. array( 'name' => $_section . '-popup-font-size', 'default' => astra_get_option( $_section . '-popup-font-size' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_section . '-popup-typography]', 'section' => $_section, 'type' => 'sub-control', 'priority' => 1, 'title' => __( 'Label / Input Text Size', 'astra-addon' ), 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 100, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'context' => astra_addon_builder_helper()->general_tab, ), // Option: Menu Font Size. array( 'name' => $_section . '-popup-button-font-size', 'default' => astra_get_option( $_section . '-popup-button-font-size' ), 'parent' => ASTRA_THEME_SETTINGS . '[' . $_section . '-popup-typography]', 'section' => $_section, 'type' => 'sub-control', 'priority' => 2, 'title' => __( 'Button Font Size', 'astra-addon' ), 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 100, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'context' => astra_addon_builder_helper()->general_tab, ), ); /** * Header - language-switcher - Typography */ $hb_lswitcher_section = 'section-hb-language-switcher'; $parent = ASTRA_THEME_SETTINGS . '[' . $hb_lswitcher_section . '-typography]'; $html_config[] = array( array( 'name' => $parent, 'default' => astra_get_option( $hb_lswitcher_section . '-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Typography', 'astra-addon' ), 'section' => $hb_lswitcher_section, 'transport' => 'postMessage', 'priority' => 23, 'divider' => array( 'ast_class' => 'ast-top-section-divider' ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[header-language-switcher-show-name]', 'operator' => '==', 'value' => true, ), astra_addon_builder_helper()->design_tab_config, ), ), /** * Option: Font Family */ array( 'name' => 'font-family-' . $hb_lswitcher_section, 'type' => 'sub-control', 'parent' => $parent, 'section' => $hb_lswitcher_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-' . $hb_lswitcher_section ), 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 13, 'connect' => 'font-weight-' . $hb_lswitcher_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Weight */ array( 'name' => 'font-weight-' . $hb_lswitcher_section, 'control' => 'ast-font', 'parent' => $parent, 'section' => $hb_lswitcher_section, 'font_type' => 'ast-font-weight', 'type' => 'sub-control', 'default' => astra_get_option( 'font-weight-' . $hb_lswitcher_section, 'inherit' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 14, 'connect' => 'font-family-' . $hb_lswitcher_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Size */ array( 'name' => 'font-size-' . $hb_lswitcher_section, 'type' => 'sub-control', 'parent' => $parent, 'section' => $hb_lswitcher_section, 'control' => 'ast-responsive-slider', 'default' => astra_get_option( 'font-size-' . $hb_lswitcher_section ), 'transport' => 'postMessage', 'priority' => 15, 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Font Extras */ array( 'name' => 'font-extras-' . $hb_lswitcher_section, 'parent' => $parent, 'section' => $hb_lswitcher_section, 'type' => 'sub-control', 'control' => 'ast-font-extras', 'priority' => 15, 'default' => astra_get_option( 'font-extras-' . $hb_lswitcher_section, $this->get_font_extras_default( 'font-extras-' . $hb_lswitcher_section, 'line-height-' . $hb_lswitcher_section, 'text-transform-' . $hb_lswitcher_section ) ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); /** * Footer - language-switcher - Typography */ $fb_lswitcher_section = 'section-fb-language-switcher'; $parent = ASTRA_THEME_SETTINGS . '[' . $fb_lswitcher_section . '-typography]'; $html_config[] = array( array( 'name' => $parent, 'default' => astra_get_option( $fb_lswitcher_section . '-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Typography', 'astra-addon' ), 'section' => $fb_lswitcher_section, 'transport' => 'postMessage', 'priority' => 2, 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[footer-language-switcher-show-name]', 'operator' => '==', 'value' => true, ), astra_addon_builder_helper()->design_tab_config, ), 'divider' => array( 'ast_class' => 'ast-bottom-section-divider' ), ), /** * Option: Font Family */ array( 'name' => 'font-family-' . $fb_lswitcher_section, 'type' => 'sub-control', 'parent' => $parent, 'section' => $fb_lswitcher_section, 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-' . $fb_lswitcher_section ), 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 13, 'connect' => 'font-weight-' . $fb_lswitcher_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Weight */ array( 'name' => 'font-weight-' . $fb_lswitcher_section, 'control' => 'ast-font', 'parent' => $parent, 'section' => $fb_lswitcher_section, 'font_type' => 'ast-font-weight', 'type' => 'sub-control', 'default' => astra_get_option( 'font-weight-' . $fb_lswitcher_section, 'inherit' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 14, 'connect' => 'font-family-' . $fb_lswitcher_section, 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Font Size */ array( 'name' => 'font-size-' . $fb_lswitcher_section, 'type' => 'sub-control', 'parent' => $parent, 'section' => $fb_lswitcher_section, 'control' => 'ast-responsive-slider', 'default' => astra_get_option( 'font-size-' . $fb_lswitcher_section ), 'transport' => 'postMessage', 'priority' => 15, 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Font Extras */ array( 'name' => 'font-extras-' . $fb_lswitcher_section, 'parent' => $parent, 'section' => $fb_lswitcher_section, 'type' => 'sub-control', 'control' => 'ast-font-extras', 'priority' => 15, 'default' => astra_get_option( 'font-extras-' . $fb_lswitcher_section, $this->get_font_extras_default( 'font-extras-' . $fb_lswitcher_section, 'line-height-' . $fb_lswitcher_section, 'text-transform-' . $fb_lswitcher_section ) ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); $html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) ); $configurations = array_merge( $configurations, $html_config ); return $configurations; } } } new Astra_Header_Builder_Typo_Configs(); classes/sections/index.php 0000666 00000000176 15165520225 0011663 0 ustar 00 <?php /** * Index file * * @package Astra Addon * @since Astra 1.0.0 */ /* Silence is golden, and we agree. */ classes/sections/class-astra-primary-menu-typo-configs.php 0000666 00000030013 15165520225 0020024 0 ustar 00 <?php /** * [Primary Menu] options for astra theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.0.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Primary_Menu_Typo_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Primary_Menu_Typo_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Primary Menu typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( array( 'name' => ASTRA_THEME_SETTINGS . '[primary-header-menu-typography]', 'default' => astra_get_option( 'primary-header-menu-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Menu Font', 'astra-addon' ), 'section' => 'section-primary-menu', 'transport' => 'postMessage', 'priority' => 72, 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), ), array( 'name' => ASTRA_THEME_SETTINGS . '[primary-sub-menu-typography]', 'default' => astra_get_option( 'primary-sub-menu-typography' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Submenu Font', 'astra-addon' ), 'section' => 'section-primary-menu', 'transport' => 'postMessage', 'priority' => 72, 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), ), /** * Option: Primary Menu Font Family */ array( 'name' => 'font-family-primary-menu', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-menu-typography]', 'section' => 'section-primary-menu', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-primary-menu' ), 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 22, 'connect' => 'font-weight-primary-menu', ), /** * Option: Primary Menu Font Weight */ array( 'name' => 'font-weight-primary-menu', 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-menu-typography]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'default' => astra_get_option( 'font-weight-primary-menu' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 24, 'connect' => 'font-family-primary-menu', ), /** * Option: Primary Menu Text Transform */ array( 'name' => 'text-transform-primary-menu', 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-menu-typography]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'control' => 'ast-select', 'transport' => 'postMessage', 'title' => __( 'Text Transform', 'astra-addon' ), 'priority' => 25, 'default' => astra_get_option( 'text-transform-primary-menu' ), 'choices' => array( '' => __( 'Inherit', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), 'capitalize' => __( 'Capitalize', 'astra-addon' ), 'uppercase' => __( 'Uppercase', 'astra-addon' ), 'lowercase' => __( 'Lowercase', 'astra-addon' ), ), ), /** * Option: Primary Menu Font Size */ array( 'name' => 'font-size-primary-menu', 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-menu-typography]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'default' => astra_get_option( 'font-size-primary-menu' ), 'priority' => 23, 'title' => __( 'Font Size', 'astra-addon' ), 'transport' => 'postMessage', 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Primary Menu Line Height */ array( 'name' => 'line-height-primary-menu', 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-menu-typography]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'priority' => 26, 'title' => __( 'Line Height', 'astra-addon' ), 'transport' => 'postMessage', 'default' => astra_get_option( 'line-height-primary-menu' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'control' => 'ast-slider', 'suffix' => 'em', 'input_attrs' => array( 'min' => 1, 'step' => 0.01, 'max' => 10, ), ), /** * Option: Primary Submenu Font Family */ array( 'name' => 'font-family-primary-dropdown-menu', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[primary-sub-menu-typography]', 'section' => 'section-primary-menu', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'default' => astra_get_option( 'font-family-primary-dropdown-menu' ), 'priority' => 28, 'connect' => 'font-weight-primary-dropdown-menu', ), /** * Option: Primary Submenu Font Weight */ array( 'name' => 'font-weight-primary-dropdown-menu', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[primary-sub-menu-typography]', 'section' => 'section-primary-menu', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'default' => astra_get_option( 'font-weight-primary-dropdown-menu' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 30, 'connect' => 'font-family-primary-dropdown-menu', ), /** * Option: Primary Submenu Text Transform */ array( 'name' => 'text-transform-primary-dropdown-menu', 'parent' => ASTRA_THEME_SETTINGS . '[primary-sub-menu-typography]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'title' => __( 'Text Transform', 'astra-addon' ), 'transport' => 'postMessage', 'priority' => 31, 'default' => astra_get_option( 'text-transform-primary-dropdown-menu' ), 'control' => 'ast-select', 'choices' => array( '' => __( 'Inherit', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), 'capitalize' => __( 'Capitalize', 'astra-addon' ), 'uppercase' => __( 'Uppercase', 'astra-addon' ), 'lowercase' => __( 'Lowercase', 'astra-addon' ), ), ), /** * Option: Primary Submenu Font Size */ array( 'name' => 'font-size-primary-dropdown-menu', 'parent' => ASTRA_THEME_SETTINGS . '[primary-sub-menu-typography]', 'section' => 'section-primary-menu', 'title' => __( 'Font Size', 'astra-addon' ), 'type' => 'sub-control', 'transport' => 'postMessage', 'priority' => 29, 'default' => astra_get_option( 'font-size-primary-dropdown-menu' ), 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Primary Submenu Line Height */ array( 'name' => 'line-height-primary-dropdown-menu', 'parent' => ASTRA_THEME_SETTINGS . '[primary-sub-menu-typography]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'priority' => 32, 'title' => __( 'Line Height', 'astra-addon' ), 'transport' => 'postMessage', 'default' => astra_get_option( 'line-height-primary-dropdown-menu' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'control' => 'ast-slider', 'suffix' => 'em', 'input_attrs' => array( 'min' => 1, 'step' => 0.01, 'max' => 5, ), ), /** * Option: Primary Header Outside Menu Item Typography Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[primary-header-outside-menu-item-typography-group]', 'default' => astra_get_option( 'primary-header-outside-menu-item-typography-group' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Outside menu item', 'astra-addon' ), 'section' => 'section-primary-menu', 'transport' => 'postMessage', 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[header-display-outside-menu]', 'operator' => '==', 'value' => '1', ), ), 'priority' => 73, ), /** * Option: Outside menu font size */ array( 'name' => 'outside-menu-font-size', 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-outside-menu-item-typography-group]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'default' => astra_get_option( 'outside-menu-font-size' ), 'priority' => 5, 'title' => __( 'Font Size', 'astra-addon' ), 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: outside Menu Line Height */ array( 'name' => 'outside-menu-line-height', 'transport' => 'postMessage', 'title' => __( 'Line Height', 'astra-addon' ), 'parent' => ASTRA_THEME_SETTINGS . '[primary-header-outside-menu-item-typography-group]', 'section' => 'section-primary-menu', 'type' => 'sub-control', 'control' => 'ast-slider', 'default' => astra_get_option( 'outside-menu-line-height' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'priority' => 7, 'suffix' => 'em', 'input_attrs' => array( 'min' => 1, 'step' => 0.01, 'max' => 10, ), ), ); return array_merge( $configurations, $_configs ); } } } new Astra_Primary_Menu_Typo_Configs(); classes/sections/class-astra-footer-typo-configs.php 0000666 00000013077 15165520225 0016710 0 ustar 00 <?php /** * Section [Footer] options for astra theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.0.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Footer_Typo_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Footer_Typo_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Fotter typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Footer Bar Typography Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[footer-bar-typography-group]', 'default' => astra_get_option( 'footer-bar-typography-group' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Content Font', 'astra-addon' ), 'section' => 'section-footer-small', 'transport' => 'postMessage', 'priority' => 47, 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'context' => array( array( 'setting' => ASTRA_THEME_SETTINGS . '[footer-sml-layout]', 'operator' => '!=', 'value' => 'disabled', ), ), ), /** * Option: Footer Content Font Family */ array( 'name' => 'font-family-footer-content', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'title' => __( 'Font Family', 'astra-addon' ), 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-typography-group]', 'section' => 'section-footer-small', 'default' => astra_get_option( 'font-family-footer-content' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-footer-content]', ), /** * Option: Footer Content Font Size */ array( 'name' => 'font-size-footer-content', 'default' => astra_get_option( 'font-size-footer-content' ), 'title' => __( 'Font Size', 'astra-addon' ), 'transport' => 'postMessage', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-typography-group]', 'section' => 'section-footer-small', 'control' => 'ast-responsive-slider', 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Footer Content Font Weight */ array( 'name' => 'font-weight-footer-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-typography-group]', 'section' => 'section-footer-small', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'default' => astra_get_option( 'font-weight-footer-content' ), 'connect' => 'font-family-footer-content', ), /** * Option: Footer Content Text Transform */ array( 'name' => 'text-transform-footer-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-typography-group]', 'section' => 'section-footer-small', 'title' => __( 'Text Transform', 'astra-addon' ), 'control' => 'ast-select', 'default' => astra_get_option( 'text-transform-footer-content' ), 'transport' => 'postMessage', 'choices' => array( '' => __( 'Inherit', 'astra-addon' ), 'none' => __( 'None', 'astra-addon' ), 'capitalize' => __( 'Capitalize', 'astra-addon' ), 'uppercase' => __( 'Uppercase', 'astra-addon' ), 'lowercase' => __( 'Lowercase', 'astra-addon' ), ), ), /** * Option: Footer Content Line Height */ array( 'name' => 'line-height-footer-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[footer-bar-typography-group]', 'section' => 'section-footer-small', 'default' => astra_get_option( 'line-height-footer-content' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_number_n_blank' ), 'title' => __( 'Line Height', 'astra-addon' ), 'transport' => 'postMessage', 'control' => 'ast-slider', 'suffix' => 'em', 'input_attrs' => array( 'min' => 1, 'step' => 0.01, 'max' => 5, ), ), ); return array_merge( $configurations, $_configs ); } } } new Astra_Footer_Typo_Configs(); classes/sections/class-astra-sidebar-typo-configs.php 0000666 00000026371 15165520225 0017024 0 ustar 00 <?php /** * Section [Sidebar] options for astra theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.0.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Sidebar_Typo_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Sidebar_Typo_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Side bar typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Divider */ array( 'name' => ASTRA_THEME_SETTINGS . '[sidebar-typography-divider]', 'section' => 'section-sidebars', 'title' => __( 'Font', 'astra-addon' ), 'type' => 'control', 'control' => 'ast-heading', 'priority' => 24, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option: SideBar title typography Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[sidebar-title-typography-group]', 'default' => astra_get_option( 'sidebar-title-typography-group' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Title Font', 'astra-addon' ), 'section' => 'section-sidebars', 'transport' => 'postMessage', 'priority' => 24, 'divider' => array( 'ast_class' => 'ast-section-spacing' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option: Widget Title Font Family */ array( 'name' => 'font-family-widget-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-title-typography-group]', 'section' => 'section-sidebars', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-widget-title' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-widget-title]', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Widget Title Font Weight */ array( 'name' => 'font-weight-widget-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-title-typography-group]', 'section' => 'section-sidebars', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'default' => astra_get_option( 'font-weight-widget-title' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-widget-title', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Widget Title Font Size */ array( 'name' => 'font-size-widget-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-title-typography-group]', 'section' => 'section-sidebars', 'transport' => 'postMessage', 'default' => astra_get_option( 'font-size-widget-title' ), 'control' => 'ast-responsive-slider', 'title' => __( 'Font Size', 'astra-addon' ), 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Widget Title Font Extras */ array( 'name' => 'font-extras-widget-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-title-typography-group]', 'control' => 'ast-font-extras', 'section' => 'section-sidebars', 'default' => astra_get_option( 'font-extras-widget-title' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), /** * Option: SideBar Content typography Group */ array( 'name' => ASTRA_THEME_SETTINGS . '[sidebar-content-typography-group]', 'default' => astra_get_option( 'sidebar-content-typography-group' ), 'type' => 'control', 'control' => 'ast-settings-group', 'title' => __( 'Content Font', 'astra-addon' ), 'section' => 'section-sidebars', 'transport' => 'postMessage', 'priority' => 24, 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option: Widget Content Font Family */ array( 'name' => 'font-family-widget-content', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-content-typography-group]', 'section' => 'section-sidebars', 'default' => astra_get_option( 'font-family-widget-content' ), 'title' => __( 'Font Family', 'astra-addon' ), 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-widget-content]', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Widget Content Font Weight */ array( 'name' => 'font-weight-widget-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-content-typography-group]', 'section' => 'section-sidebars', 'control' => 'ast-font', 'font_type' => 'ast-font-weight', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_font_weight' ), 'default' => astra_get_option( 'font-weight-widget-content' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'connect' => 'font-family-widget-content', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Widget Content Font Size */ array( 'name' => 'font-size-widget-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-content-typography-group]', 'section' => 'section-sidebars', 'control' => 'ast-responsive-slider', 'default' => astra_get_option( 'font-size-widget-content' ), 'title' => __( 'Font Size', 'astra-addon' ), 'transport' => 'postMessage', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 200, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), ), /** * Option: Widget Content Font Extras */ array( 'name' => 'font-extras-widget-content', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[sidebar-content-typography-group]', 'control' => 'ast-font-extras', 'section' => 'section-sidebars', 'default' => astra_get_option( 'font-extras-widget-content' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), /** * Option: Widget Title Font Size */ array( 'name' => ASTRA_THEME_SETTINGS . '[font-size-sidebar-title]', 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'section' => 'section-sidebars', 'transport' => 'refresh', 'title' => __( 'Widget Title Font Size', 'astra-addon' ), 'priority' => 24, 'default' => astra_get_option( 'font-size-sidebar-title' ), 'suffix' => array( 'px', 'em' ), 'input_attrs' => array( 'px' => array( 'min' => 0, 'step' => 1, 'max' => 100, ), 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 20, ), ), 'divider' => array( 'ast_class' => 'ast-top-section-divider ast-bottom-section-divider' ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), /** * Option: Widget Font Size */ array( 'name' => ASTRA_THEME_SETTINGS . '[font-size-sidebar-content]', 'type' => 'control', 'control' => 'ast-responsive-slider', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), 'section' => 'section-sidebars', 'transport' => 'refresh', 'title' => __( 'Widget Font Size ', 'astra-addon' ), 'priority' => 24, 'default' => astra_get_option( 'font-size-sidebar-content' ), 'suffix' => array( 'em' ), 'input_attrs' => array( 'em' => array( 'min' => 0, 'step' => 0.01, 'max' => 5, ), ), 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, ), ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $_configs[] = array( 'name' => 'section-sidebars-ast-context-tabs', 'section' => 'section-sidebars', 'type' => 'control', 'control' => 'ast-builder-header-control', 'priority' => 0, 'description' => '', ); } return array_merge( $configurations, $_configs ); } } } new Astra_Sidebar_Typo_Configs(); classes/sections/class-astra-site-header-typo-configs.php 0000666 00000011213 15165520225 0017572 0 ustar 00 <?php /** * [Header] options for astra theme. * * @package Astra Addon * @link https://www.brainstormforce.com * @since 1.0.0 */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Site_Header_Typo_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Site_Header_Typo_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Footer typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Site Title Font Family */ array( 'name' => 'font-family-site-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[site-title-typography]', 'section' => 'title_tagline', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-site-title' ), 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 8, 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-site-title]', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Site Title Font Weight */ array( 'name' => 'font-weight-site-title', 'control' => 'ast-font', 'parent' => ASTRA_THEME_SETTINGS . '[site-title-typography]', 'section' => 'title_tagline', 'font_type' => 'ast-font-weight', 'type' => 'sub-control', 'title' => __( 'Font Weight', 'astra-addon' ), 'default' => astra_get_option( 'font-weight-site-title' ), 'priority' => 10, 'connect' => 'font-family-site-title', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Widget Content Font Extras */ array( 'name' => 'font-extras-site-title', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[site-title-typography]', 'control' => 'ast-font-extras', 'priority' => 12, 'section' => 'title_tagline', 'default' => astra_get_option( 'font-extras-site-title' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), /** * Option: Site Tagline Font Family */ array( 'name' => 'font-family-site-tagline', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', 'section' => 'title_tagline', 'control' => 'ast-font', 'font_type' => 'ast-font-family', 'default' => astra_get_option( 'font-family-site-tagline' ), 'title' => __( 'Font Family', 'astra-addon' ), 'priority' => 13, 'connect' => ASTRA_THEME_SETTINGS . '[font-weight-site-tagline]', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Site Tagline Font Weight */ array( 'name' => 'font-weight-site-tagline', 'control' => 'ast-font', 'parent' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', 'section' => 'title_tagline', 'font_type' => 'ast-font-weight', 'type' => 'sub-control', 'default' => astra_get_option( 'font-weight-site-tagline' ), 'title' => __( 'Font Weight', 'astra-addon' ), 'priority' => 15, 'connect' => 'font-family-site-tagline', 'divider' => array( 'ast_class' => 'ast-sub-bottom-dotted-divider' ), ), /** * Option: Widget Content Font Extras */ array( 'name' => 'font-extras-site-tagline', 'type' => 'sub-control', 'parent' => ASTRA_THEME_SETTINGS . '[site-tagline-typography]', 'control' => 'ast-font-extras', 'priority' => 17, 'section' => 'title_tagline', 'default' => astra_get_option( 'font-extras-site-tagline' ), 'title' => __( 'Font Extras', 'astra-addon' ), ), ); return array_merge( $configurations, $_configs ); } } } new Astra_Site_Header_Typo_Configs(); classes/class-astra-typo-panel-section-configs.php 0000666 00000002710 15165520225 0016314 0 ustar 00 <?php /** * Typography - Panels & Sections * * @package Astra Addon */ // Block direct access to the file. if ( ! defined( 'ABSPATH' ) ) { exit; } // Bail if Customizer config base class does not exist. if ( ! class_exists( 'Astra_Customizer_Config_Base' ) ) { return; } if ( ! class_exists( 'Astra_Typo_Panel_Section_Configs' ) ) { /** * Register below header Configurations. */ // @codingStandardsIgnoreStart class Astra_Typo_Panel_Section_Configs extends Astra_Customizer_Config_Base { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Register Typography Customizer Configurations. * * @param Array $configurations Astra Customizer Configurations. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @since 1.4.3 * @return Array Astra Customizer Configurations with updated configurations. */ public function register_configuration( $configurations, $wp_customize ) { $_configs = array( array( 'name' => 'section-primary-menu-typo', 'type' => 'section', 'title' => __( 'Primary Menu', 'astra-addon' ), 'panel' => 'panel-typography', 'section' => 'section-header-typo-group', 'priority' => 25, ), ); return array_merge( $configurations, $_configs ); } } } new Astra_Typo_Panel_Section_Configs(); classes/dynamic.css.php 0000666 00000140537 15165520225 0011146 0 ustar 00 <?php /** * Typography - Dynamic CSS * * @package Astra Addon */ add_filter( 'astra_addon_dynamic_css', 'astra_typography_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return string */ function astra_typography_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $body_font_family = astra_body_font_family(); $body_text_transform = astra_get_option( 'body-text-transform', 'inherit' ); $headings_font_family = astra_get_option( 'headings-font-family' ); $headings_font_weight = astra_get_option( 'headings-font-weight' ); $headings_font_transform = astra_get_option( 'headings-text-transform', $body_text_transform ); $site_title_font_family = astra_get_option( 'font-family-site-title' ); $site_title_font_weight = astra_get_option( 'font-weight-site-title' ); $site_title_line_height = astra_addon_get_font_extras( astra_get_option( 'font-extras-site-title' ), 'line-height', 'line-height-unit' ); $site_title_text_transform = astra_addon_get_font_extras( astra_get_option( 'font-extras-site-title', $headings_font_transform ), 'text-transform' ); $site_title_letter_spacing = astra_addon_get_font_extras( astra_get_option( 'font-extras-site-title' ), 'letter-spacing', 'letter-spacing-unit' ); $site_title_text_decoration = astra_addon_get_font_extras( astra_get_option( 'font-extras-site-title' ), 'text-decoration' ); $archive_page_title_font_family = astra_get_option( 'font-family-page-title' ); $archive_page_title_font_weight = astra_get_option( 'font-weight-page-title' ); $archive_page_title_text_transform = astra_addon_get_font_extras( astra_get_option( 'font-extras-page-title', $headings_font_transform ), 'text-transform' ); $archive_page_title_line_height = astra_addon_get_font_extras( astra_get_option( 'font-extras-page-title' ), 'line-height', 'line-height-unit' ); $archive_page_title_letter_spacing = astra_addon_get_font_extras( astra_get_option( 'font-extras-page-title' ), 'letter-spacing', 'letter-spacing-unit' ); $archive_page_title_text_decoration = astra_addon_get_font_extras( astra_get_option( 'font-extras-page-title' ), 'text-decoration' ); $post_meta_font_size = astra_get_option( 'font-size-post-meta' ); $post_pagination_font_size = astra_get_option( 'font-size-post-pagination' ); $post_pagination_text_transform = astra_get_option( 'text-transform-post-pagination' ); $widget_title_font_size = astra_get_option( 'font-size-widget-title' ); $widget_title_font_family = astra_get_option( 'font-family-widget-title' ); $widget_title_font_weight = astra_get_option( 'font-weight-widget-title' ); $widget_title_line_height = astra_addon_get_font_extras( astra_get_option( 'font-extras-widget-title' ), 'line-height', 'line-height-unit' ); $widget_title_text_transform = astra_addon_get_font_extras( astra_get_option( 'font-extras-widget-title', $headings_font_transform ), 'text-transform' ); $widget_title_letter_spacing = astra_addon_get_font_extras( astra_get_option( 'font-extras-widget-title' ), 'letter-spacing', 'letter-spacing-unit' ); $widget_title_text_decoration = astra_addon_get_font_extras( astra_get_option( 'font-extras-widget-title' ), 'text-decoration' ); $widget_content_font_size = astra_get_option( 'font-size-widget-content' ); $footer_content_font_size = astra_get_option( 'font-size-footer-content' ); $footer_content_font_family = astra_get_option( 'font-family-footer-content' ); $footer_content_font_weight = astra_get_option( 'font-weight-footer-content' ); $footer_content_line_height = astra_get_option( 'line-height-footer-content' ); $footer_content_text_transform = astra_get_option( 'text-transform-footer-content' ); $h4_font_weight = astra_get_option( 'font-weight-h4' ); $h4_line_height = astra_addon_get_font_extras( astra_get_option( 'font-extras-h4' ), 'line-height', 'line-height-unit' ); $h5_font_weight = astra_get_option( 'font-weight-h5' ); $h5_line_height = astra_addon_get_font_extras( astra_get_option( 'font-extras-h5' ), 'line-height', 'line-height-unit' ); $h6_font_weight = astra_get_option( 'font-weight-h6' ); $h6_line_height = astra_addon_get_font_extras( astra_get_option( 'font-extras-h6' ), 'line-height', 'line-height-unit' ); $button_font_size = astra_get_option( 'font-size-button' ); $button_font_family = astra_get_option( 'font-family-button' ); $button_font_weight = astra_get_option( 'font-weight-button' ); $button_text_transform = astra_addon_get_font_extras( astra_get_option( 'font-extras-button' ), 'text-transform' ); $outside_menu_item_font = astra_get_option( 'outside-menu-font-size' ); $outside_menu_line_height = astra_get_option( 'outside-menu-line-height' ); $is_widget_title_support_font_weight = Astra_Addon_Update_Filter_Function::support_addon_font_css_to_widget_and_in_editor(); $font_weight_prop = ( $is_widget_title_support_font_weight ) ? 'inherit' : 'normal'; // Fallback for Site Title - headings typography. if ( 'inherit' == $site_title_font_family ) { $site_title_font_family = $headings_font_family; } if ( $font_weight_prop === $site_title_font_weight ) { $site_title_font_weight = $headings_font_weight; } // Fallback for Archive Page Title - headings typography. if ( 'inherit' == $archive_page_title_font_family ) { $archive_page_title_font_family = $headings_font_family; } if ( $font_weight_prop === $archive_page_title_font_weight ) { $archive_page_title_font_weight = $headings_font_weight; } // Fallback for Sidebar Widget Title - headings typography. if ( 'inherit' == $widget_title_font_family ) { $widget_title_font_family = $headings_font_family; } if ( $font_weight_prop === $widget_title_font_weight ) { $widget_title_font_weight = $headings_font_weight; } // Fallback for H4 - headings typography. if ( $font_weight_prop === $h4_font_weight ) { $h4_font_weight = $headings_font_weight; } // Fallback for H5 - headings typography. if ( $font_weight_prop === $h5_font_weight ) { $h5_font_weight = $headings_font_weight; } // Fallback for H6 - headings typography. if ( $font_weight_prop === $h6_font_weight ) { $h6_font_weight = $headings_font_weight; } /** * Set font sizes */ $css_output = array( /** * Site Title */ '.site-title, .site-title a' => array( 'font-weight' => astra_get_css_value( $site_title_font_weight, 'font' ), 'font-family' => astra_get_css_value( $site_title_font_family, 'font', $body_font_family ), 'line-height' => esc_attr( $site_title_line_height ), 'text-transform' => esc_attr( $site_title_text_transform ), 'text-decoration' => esc_attr( $site_title_text_decoration ), 'letter-spacing' => esc_attr( $site_title_letter_spacing ), ), /** * Site Description */ '.site-header .site-description' => astra_addon_get_font_array_css( astra_get_option( 'font-family-site-tagline' ), astra_get_option( 'font-weight-site-tagline' ), array(), 'font-extras-site-tagline' ), /** * Post Meta */ '.entry-meta, .read-more' => astra_addon_get_font_array_css( astra_get_option( 'font-family-post-meta' ), astra_get_option( 'font-weight-post-meta' ), $post_meta_font_size, 'font-extras-post-meta' ), /** * Pagination */ '.ast-pagination .page-numbers, .ast-pagination .page-navigation' => array( 'font-size' => astra_responsive_font( $post_pagination_font_size, 'desktop' ), 'text-transform' => esc_attr( $post_pagination_text_transform ), ), /** * Widget Content */ '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' => array( 'font-size' => astra_responsive_font( $widget_title_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $widget_title_font_weight, 'font' ), 'font-family' => astra_get_css_value( $widget_title_font_family, 'font', $body_font_family ), 'line-height' => esc_attr( $widget_title_line_height ), 'text-transform' => esc_attr( $widget_title_text_transform ), 'text-decoration' => esc_attr( $widget_title_text_decoration ), 'letter-spacing' => esc_attr( $widget_title_letter_spacing ), ), /** * Widget Content */ '.secondary .widget > *:not(.widget-title)' => astra_addon_get_font_array_css( astra_get_option( 'font-family-widget-content' ), astra_get_option( 'font-weight-widget-content' ), $widget_content_font_size, 'font-extras-widget-content' ), /** * Small Footer */ '.ast-small-footer' => array( 'font-size' => astra_responsive_font( $footer_content_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $footer_content_font_weight, 'font' ), 'font-family' => astra_get_css_value( $footer_content_font_family, 'font' ), 'line-height' => esc_attr( $footer_content_line_height ), 'text-transform' => esc_attr( $footer_content_text_transform ), ), /** * Single Entry Title / Page Title */ '.ast-single-post .entry-title, .page-title' => astra_addon_get_font_array_css( astra_get_option( 'font-family-entry-title' ), astra_get_option( 'font-weight-entry-title' ), array(), 'font-extras-entry-title' ), /** * Archive Summary Box */ '.ast-archive-description .ast-archive-title' => astra_addon_get_font_array_css( astra_get_option( 'font-family-archive-summary-title' ), astra_get_option( 'font-weight-archive-summary-title' ), array(), 'archive-summary-font-extras' ), /** * Entry Title */ '.blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a' => array( 'font-family' => astra_get_css_value( $archive_page_title_font_family, 'font', $body_font_family ), 'font-weight' => astra_get_css_value( $archive_page_title_font_weight, 'font' ), 'line-height' => esc_attr( $archive_page_title_line_height ), 'text-transform' => esc_attr( $archive_page_title_text_transform ), 'text-decoration' => esc_attr( $archive_page_title_text_decoration ), 'letter-spacing' => esc_attr( $archive_page_title_letter_spacing ), ), /** * Button */ 'button, .ast-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' => array( 'font-size' => astra_get_font_css_value( $button_font_size['desktop'], $button_font_size['desktop-unit'] ), 'font-weight' => astra_get_css_value( $button_font_weight, 'font' ), 'font-family' => astra_get_css_value( $button_font_family, 'font' ), 'text-transform' => esc_attr( $button_text_transform ), ), '.ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *' => array( 'font-size' => astra_get_font_css_value( $outside_menu_item_font['desktop'], $outside_menu_item_font['desktop-unit'] ), 'line-height' => esc_attr( $outside_menu_line_height ), ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output ); /* Adding font-weight support to widget-titles. */ if ( $is_widget_title_support_font_weight ) { $widget_title_font_weight_support = array( 'h4.widget-title' => array( 'font-weight' => esc_attr( $h4_font_weight ), ), 'h5.widget-title' => array( 'font-weight' => esc_attr( $h5_font_weight ), ), 'h6.widget-title' => array( 'font-weight' => esc_attr( $h6_font_weight ), ), ); /* Parse CSS from array() -> All media CSS */ $css_output .= astra_parse_css( $widget_title_font_weight_support ); } if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { $primary_menu_font_size = astra_get_option( 'font-size-primary-menu' ); $primary_menu_font_weight = astra_get_option( 'font-weight-primary-menu' ); $primary_menu_font_family = astra_get_option( 'font-family-primary-menu' ); $primary_menu_line_height = astra_get_option( 'line-height-primary-menu' ); $primary_menu_text_transform = astra_get_option( 'text-transform-primary-menu' ); $primary_dropdown_menu_font_size = astra_get_option( 'font-size-primary-dropdown-menu' ); $primary_dropdown_menu_font_weight = astra_get_option( 'font-weight-primary-dropdown-menu' ); $primary_dropdown_menu_font_family = astra_get_option( 'font-family-primary-dropdown-menu' ); $primary_dropdown_menu_line_height = astra_get_option( 'line-height-primary-dropdown-menu' ); $primary_dropdown_menu_text_transform = astra_get_option( 'text-transform-primary-dropdown-menu' ); $primary_menu_css_output = array( /** * Primary Menu */ '.main-navigation' => array( 'font-size' => astra_responsive_font( $primary_menu_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $primary_menu_font_weight, 'font' ), 'font-family' => astra_get_css_value( $primary_menu_font_family, 'font' ), ), '.main-header-bar' => array( 'line-height' => esc_attr( $primary_menu_line_height ), ), '.main-header-bar .main-header-bar-navigation' => array( 'text-transform' => esc_attr( $primary_menu_text_transform ), ), /** * Primary Submenu */ '.main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type' => array( 'font-size' => astra_responsive_font( $primary_dropdown_menu_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $primary_dropdown_menu_font_weight, 'font' ), 'font-family' => astra_get_css_value( $primary_dropdown_menu_font_family, 'font' ), ), '.main-header-bar .main-header-bar-navigation .sub-menu' => array( 'line-height' => esc_attr( $primary_dropdown_menu_line_height ), 'text-transform' => esc_attr( $primary_dropdown_menu_text_transform ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $primary_menu_css_output ); } /** * Elementor & Gutenberg button backward compatibility for default styling. */ if ( Astra_Addon_Update_Filter_Function::page_builder_addon_button_style_css() ) { $global_button_page_builder_css_desktop = array( /** * Elementor Heading - <h4> */ '.elementor-widget-heading h4.elementor-heading-title' => array( 'line-height' => esc_attr( $h4_line_height ), ), /** * Elementor Heading - <h5> */ '.elementor-widget-heading h5.elementor-heading-title' => array( 'line-height' => esc_attr( $h5_line_height ), ), /** * Elementor Heading - <h6> */ '.elementor-widget-heading h6.elementor-heading-title' => array( 'line-height' => esc_attr( $h6_line_height ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $global_button_page_builder_css_desktop ); } $tablet_css = array( '.entry-meta, .read-more' => array( 'font-size' => astra_responsive_font( $post_meta_font_size, 'tablet' ), ), '.ast-pagination .page-numbers, .ast-pagination .page-navigation' => array( 'font-size' => astra_responsive_font( $post_pagination_font_size, 'tablet' ), ), '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' => array( 'font-size' => astra_responsive_font( $widget_title_font_size, 'tablet' ), ), '.secondary .widget > *:not(.widget-title)' => array( 'font-size' => astra_responsive_font( $widget_content_font_size, 'tablet' ), ), '.ast-small-footer' => array( 'font-size' => astra_responsive_font( $footer_content_font_size, 'tablet' ), ), 'button, .ast-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' => array( 'font-size' => astra_get_font_css_value( $button_font_size['tablet'], $button_font_size['tablet-unit'] ), ), '.ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *' => array( 'font-size' => astra_get_font_css_value( $outside_menu_item_font['tablet'], $outside_menu_item_font['tablet-unit'] ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $tablet_css, '', astra_addon_get_tablet_breakpoint() ); if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { $menu_tablet_css = array( '.main-navigation' => array( 'font-size' => astra_responsive_font( $primary_menu_font_size, 'tablet' ), ), '.main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type' => array( 'font-size' => astra_responsive_font( $primary_dropdown_menu_font_size, 'tablet' ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $menu_tablet_css, '', astra_addon_get_tablet_breakpoint() ); } $mobile_css = array( '.entry-meta, .read-more' => array( 'font-size' => astra_responsive_font( $post_meta_font_size, 'mobile' ), ), '.ast-pagination .page-numbers, .ast-pagination .page-navigation' => array( 'font-size' => astra_responsive_font( $post_pagination_font_size, 'mobile' ), ), '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' => array( 'font-size' => astra_responsive_font( $widget_title_font_size, 'mobile' ), ), '.secondary .widget > *:not(.widget-title)' => array( 'font-size' => astra_responsive_font( $widget_content_font_size, 'mobile' ), ), '.ast-small-footer' => array( 'font-size' => astra_responsive_font( $footer_content_font_size, 'mobile' ), ), 'button, .ast-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' => array( 'font-size' => astra_get_font_css_value( $button_font_size['mobile'], $button_font_size['mobile-unit'] ), ), '.ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *' => array( 'font-size' => astra_get_font_css_value( $outside_menu_item_font['mobile'], $outside_menu_item_font['mobile-unit'] ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $mobile_css, '', astra_addon_get_mobile_breakpoint() ); if ( false === astra_addon_builder_helper()->is_header_footer_builder_active ) { $menu_mobile_css = array( '.main-navigation' => array( 'font-size' => astra_responsive_font( $primary_menu_font_size, 'mobile' ), ), '.main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type' => array( 'font-size' => astra_responsive_font( $primary_dropdown_menu_font_size, 'mobile' ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $menu_mobile_css, '', astra_addon_get_mobile_breakpoint() ); } /** * Merge Header Section when no primary menu */ if ( Astra_Ext_Extension::is_active( 'header-sections' ) && false === astra_addon_builder_helper()->is_header_footer_builder_active ) { /** * Set font sizes */ $header_sections = array( /** * Primary Menu */ '.ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items' => array( 'font-size' => astra_responsive_font( $primary_menu_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $primary_menu_font_weight, 'font' ), 'font-family' => astra_get_css_value( $primary_menu_font_family, 'font' ), ), /** * Primary Submenu */ '.ast-header-sections-navigation li > .sub-menu:first-of-type, .ast-above-header-menu-items .menu-item > .sub-menu:first-of-type, .ast-below-header-menu-items li > .sub-menu:first-of-type' => array( 'font-size' => astra_responsive_font( $primary_dropdown_menu_font_size, 'desktop' ), 'font-weight' => astra_get_css_value( $primary_dropdown_menu_font_weight, 'font' ), 'font-family' => astra_get_css_value( $primary_dropdown_menu_font_family, 'font' ), ), '.ast-header-sections-navigation .sub-menu, .ast-above-header-menu-items .sub-menu, .ast-below-header-menu-items .sub-menu,' => array( 'line-height' => esc_attr( $primary_dropdown_menu_line_height ), 'text-transform' => esc_attr( $primary_dropdown_menu_text_transform ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $header_sections ); $tablet_header_sections = array( '.ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items' => array( 'font-size' => astra_responsive_font( $primary_menu_font_size, 'tablet' ), ), '.ast-header-sections-navigation li > .sub-menu:first-of-type, .ast-above-header-menu-items .menu-item > .sub-menu:first-of-type, .ast-below-header-menu-items li > .sub-menu:first-of-type' => array( 'font-size' => astra_responsive_font( $primary_dropdown_menu_font_size, 'tablet' ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $tablet_header_sections, '', astra_addon_get_tablet_breakpoint() ); $mobile_header_sections = array( '.ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items' => array( 'font-size' => astra_responsive_font( $primary_menu_font_size, 'mobile' ), ), '.ast-header-sections-navigation li > .sub-menu:first-of-type, .ast-above-header-menu-items .menu-item > .sub-menu:first-of-type, .ast-below-header-menu-items li > .sub-menu:first-of-type' => array( 'font-size' => astra_responsive_font( $primary_dropdown_menu_font_size, 'mobile' ), ), ); /* Parse CSS from array() */ $css_output .= astra_parse_css( $mobile_header_sections, '', astra_addon_get_mobile_breakpoint( 1, '' ) ); } if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { /** * Header - Menu - Typography. */ $num_of_header_menu = astra_addon_builder_helper()->num_of_header_menu; for ( $index = 1; $index <= $num_of_header_menu; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'menu-' . $index, 'header' ) ) { continue; } $_prefix = 'menu' . $index; $_section = 'section-hb-menu-' . $index; $selector = '.ast-hfb-header .ast-builder-menu-' . $index . ' .main-header-menu'; $selector_desktop = '.ast-hfb-header.ast-desktop .ast-builder-menu-' . $index . ' .main-header-menu'; if ( version_compare( ASTRA_THEME_VERSION, '3.2.0', '<' ) ) { $selector = '.astra-hfb-header .ast-builder-menu-' . $index . ' .main-header-menu'; $selector_desktop = '.astra-hfb-header.ast-desktop .ast-builder-menu-' . $index . ' .main-header-menu'; } $sub_menu_font_size = astra_get_option( 'header-font-size-' . $_prefix . '-sub-menu' ); $sub_menu_font_size_desktop = ( isset( $sub_menu_font_size['desktop'] ) ) ? $sub_menu_font_size['desktop'] : ''; $sub_menu_font_size_tablet = ( isset( $sub_menu_font_size['tablet'] ) ) ? $sub_menu_font_size['tablet'] : ''; $sub_menu_font_size_mobile = ( isset( $sub_menu_font_size['mobile'] ) ) ? $sub_menu_font_size['mobile'] : ''; $sub_menu_font_size_desktop_unit = ( isset( $sub_menu_font_size['desktop-unit'] ) ) ? $sub_menu_font_size['desktop-unit'] : ''; $sub_menu_font_size_tablet_unit = ( isset( $sub_menu_font_size['tablet-unit'] ) ) ? $sub_menu_font_size['tablet-unit'] : ''; $sub_menu_font_size_mobile_unit = ( isset( $sub_menu_font_size['mobile-unit'] ) ) ? $sub_menu_font_size['mobile-unit'] : ''; $css_output_desktop = array( $selector . ' .sub-menu .menu-link' => astra_addon_get_font_array_css( astra_get_option( 'header-font-family-' . $_prefix . '-sub-menu' ), astra_get_option( 'header-font-weight-' . $_prefix . '-sub-menu' ), $sub_menu_font_size, 'header-font-extras-' . $_prefix . '-sub-menu' ), ); $css_output_tablet = array( $selector . '.ast-nav-menu .sub-menu .menu-item .menu-link' => array( 'font-size' => astra_get_font_css_value( $sub_menu_font_size_tablet, $sub_menu_font_size_tablet_unit ), ), ); $css_output_mobile = array( $selector . '.ast-nav-menu .sub-menu .menu-item .menu-link' => array( 'font-size' => astra_get_font_css_value( $sub_menu_font_size_mobile, $sub_menu_font_size_mobile_unit ), ), ); if ( 3 > $index ) { $mega_menu_heading_font_size = astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-size' ); $mega_menu_heading_font_size_desktop = ( isset( $mega_menu_heading_font_size['desktop'] ) ) ? $mega_menu_heading_font_size['desktop'] : ''; $mega_menu_heading_font_size_tablet = ( isset( $mega_menu_heading_font_size['tablet'] ) ) ? $mega_menu_heading_font_size['tablet'] : ''; $mega_menu_heading_font_size_mobile = ( isset( $mega_menu_heading_font_size['mobile'] ) ) ? $mega_menu_heading_font_size['mobile'] : ''; $mega_menu_heading_font_size_tablet_unit = ( isset( $mega_menu_heading_font_size['tablet-unit'] ) ) ? $mega_menu_heading_font_size['tablet-unit'] : ''; $mega_menu_heading_font_size_mobile_unit = ( isset( $mega_menu_heading_font_size['mobile-unit'] ) ) ? $mega_menu_heading_font_size['mobile-unit'] : ''; $css_megamenu_output_desktop = array( // Mega Menu. $selector_desktop . ' .menu-item.menu-item-heading > .menu-link' => astra_addon_get_font_array_css( astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-family' ), astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-weight' ), $mega_menu_heading_font_size, 'header-' . $_prefix . '-megamenu-heading-font-extras' ), ); $css_megamenu_output_tablet = array( // Mega Menu. $selector . ' .menu-item.menu-item-heading > .menu-link' => array( 'font-size' => astra_get_font_css_value( $mega_menu_heading_font_size_tablet, $mega_menu_heading_font_size_tablet_unit ), ), ); $css_megamenu_output_mobile = array( // Mega Menu. $selector . ' .menu-item.menu-item-heading > .menu-link' => array( 'font-size' => astra_get_font_css_value( $mega_menu_heading_font_size_mobile, $mega_menu_heading_font_size_mobile_unit ), ), ); $css_output .= astra_parse_css( $css_megamenu_output_desktop ); $css_output .= astra_parse_css( $css_megamenu_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_megamenu_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } $css_output .= astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Header - HTML - Typography. */ $num_of_header_html = astra_addon_builder_helper()->num_of_header_html; for ( $index = 1; $index <= $num_of_header_html; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'html-' . $index, 'header' ) ) { continue; } $_prefix = 'html' . $index; $section = 'section-hb-html-'; $selector = '.site-header-section .ast-builder-layout-element.ast-header-html-' . $index . ' .ast-builder-html-element'; $section_id = $section . $index; /** * Typography CSS. */ $css_output_desktop = array( $selector => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $section_id, 'inherit' ), astra_get_option( 'font-weight-' . $section_id, 'inherit' ), array(), 'font-extras-' . $section_id ), ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Header - Widget - Typography. */ $num_of_header_widgets = astra_addon_builder_helper()->num_of_header_widgets; for ( $index = 1; $index <= $num_of_header_widgets; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'widget-' . $index, 'header' ) ) { continue; } $_section = 'sidebar-widgets-header-widget-' . $index; $selector = '.header-widget-area[data-section="sidebar-widgets-header-widget-' . $index . '"]'; /** * Typography CSS. */ $css_output_desktop = array( $selector . ' .widget-title' => astra_addon_get_font_array_css( astra_get_option( 'header-widget-' . $index . '-font-family', 'inherit' ), astra_get_option( 'header-widget-' . $index . '-font-weight', 'inherit' ), array(), 'header-widget-' . $index . '-font-extras' ), ); if ( Astra_Addon_Builder_Helper::apply_flex_based_css() ) { $header_widget_selector = $selector . '.header-widget-area-inner'; } else { $header_widget_selector = $selector . ' .header-widget-area-inner'; } $css_output_desktop[ $header_widget_selector ] = astra_addon_get_font_array_css( astra_get_option( 'header-widget-' . $index . '-content-font-family', 'inherit' ), astra_get_option( 'header-widget-' . $index . '-content-font-weight', 'inherit' ), array(), 'header-widget-' . $index . '-content-font-extras' ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Footer - Widget - Typography. */ $num_of_footer_widgets = astra_addon_builder_helper()->num_of_footer_widgets; for ( $index = 1; $index <= $num_of_footer_widgets; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'widget-' . $index, 'footer' ) ) { continue; } $_section = 'sidebar-widgets-footer-widget-' . $index; $selector = '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' . $index . '"]'; /** * Typography CSS. */ $css_output_desktop = array( $selector . ' .widget-title' => astra_addon_get_font_array_css( astra_get_option( 'footer-widget-' . $index . '-font-family', 'inherit' ), astra_get_option( 'footer-widget-' . $index . '-font-weight', 'inherit' ), array(), 'footer-widget-' . $index . '-font-extras' ), ); if ( Astra_Addon_Builder_Helper::apply_flex_based_css() ) { $footer_widget_selector = $selector . '.footer-widget-area-inner'; } else { $footer_widget_selector = $selector . ' .footer-widget-area-inner'; } $css_output_desktop[ $footer_widget_selector ] = astra_addon_get_font_array_css( astra_get_option( 'footer-widget-' . $index . '-content-font-family', 'inherit' ), astra_get_option( 'footer-widget-' . $index . '-content-font-weight', 'inherit' ), array(), 'footer-widget-' . $index . '-content-font-extras' ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Footer - HTML - Typography. */ $num_of_footer_html = astra_addon_builder_helper()->num_of_footer_html; for ( $index = 1; $index <= $num_of_footer_html; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'html-' . $index, 'footer' ) ) { continue; } $_prefix = 'html' . $index; $section = 'section-fb-html-'; $selector = '.site-footer-section .ast-footer-html-' . $index . ' .ast-builder-html-element'; $section_id = $section . $index; /** * Typography CSS. */ $css_output_desktop = array( $selector => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $section_id ), astra_get_option( 'font-weight-' . $section_id ), array(), 'font-extras-' . $section_id ), ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Header - Social - Typography */ $num_of_header_social_icons = astra_addon_builder_helper()->num_of_header_social_icons; for ( $index = 1; $index <= $num_of_header_social_icons; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'social-icons-' . $index, 'header' ) ) { continue; } $_section = 'section-hb-social-icons-' . $index; $selector = '.ast-builder-layout-element .ast-header-social-' . $index . '-wrap'; /** * Typography CSS. */ $css_output_desktop = array( $selector => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $_section ), astra_get_option( 'font-weight-' . $_section ), array(), 'font-extras-' . $_section ), ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Footer - Social - Typography */ $num_of_footer_social_icons = astra_addon_builder_helper()->num_of_footer_social_icons; for ( $index = 1; $index <= $num_of_footer_social_icons; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'social-icons-' . $index, 'footer' ) ) { continue; } $_section = 'section-fb-social-icons-' . $index; $selector = '.ast-builder-layout-element .ast-footer-social-' . $index . '-wrap'; /** * Typography CSS. */ $css_output_desktop = array( $selector => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $_section ), astra_get_option( 'font-weight-' . $_section ), array(), 'font-extras-' . $_section ), ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Footer - Copyright - Typography */ if ( Astra_Addon_Builder_Helper::is_component_loaded( 'copyright', 'footer' ) ) { $selector = '.ast-footer-copyright'; $_section = 'section-footer-copyright'; /** * Typography CSS. */ $css_output_desktop = array( $selector => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $_section ), astra_get_option( 'font-weight-' . $_section ), array(), 'font-extras-' . $_section ), ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Header - Account - Typography */ if ( Astra_Addon_Builder_Helper::is_component_loaded( 'account', 'header' ) ) { $selector = '.ast-header-account-wrap'; $_section = 'section-header-account'; $menu_font_size = astra_get_option( $_section . '-menu-font-size' ); $menu_font_size_tablet = ( isset( $menu_font_size['tablet'] ) ) ? $menu_font_size['tablet'] : ''; $menu_font_size_mobile = ( isset( $menu_font_size['mobile'] ) ) ? $menu_font_size['mobile'] : ''; $menu_font_size_tablet_unit = ( isset( $menu_font_size['tablet-unit'] ) ) ? $menu_font_size['tablet-unit'] : ''; $menu_font_size_mobile_unit = ( isset( $menu_font_size['mobile-unit'] ) ) ? $menu_font_size['mobile-unit'] : ''; $popup_font_size = astra_get_option( $_section . '-popup-font-size' ); $popup_button_size = astra_get_option( $_section . '-popup-button-font-size' ); /** * Typography CSS. */ $css_output_desktop = array( $selector . ' .ast-header-account-text' => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $_section, 'inherit' ), astra_get_option( 'font-weight-' . $_section, 'inherit' ), array(), 'font-extras-' . $_section ), $selector . ' .main-header-menu.ast-account-nav-menu .menu-link' => astra_addon_get_font_array_css( astra_get_option( $_section . '-menu-font-family' ), astra_get_option( $_section . '-menu-font-weight' ), $menu_font_size, $_section . '-menu-font-extras' ), $selector . ' .ast-hb-account-login-form label,' . $selector . ' .ast-hb-account-login-form-footer .ast-header-account-footer-link, ' . $selector . ' .ast-hb-account-login-form #loginform input[type=text], ' . $selector . ' .ast-hb-account-login-form #loginform input[type=password]' => array( // Typography. 'font-size' => astra_responsive_font( $popup_font_size, 'desktop' ), ), $selector . ' .ast-hb-account-login-form input[type="submit"]' => array( 'font-size' => astra_responsive_font( $popup_button_size, 'desktop' ), ), ); $css_output_tablet = array( $selector . ' .ast-hb-account-login-form label,' . $selector . ' .ast-hb-account-login-form-footer .ast-header-account-footer-link, ' . $selector . ' .ast-hb-account-login-form #loginform input[type=text], ' . $selector . ' .ast-hb-account-login-form #loginform input[type=password]' => array( 'font-size' => astra_responsive_font( $popup_font_size, 'tablet' ), ), $selector . ' .main-header-menu.ast-account-nav-menu .menu-link' => array( 'font-size' => astra_get_font_css_value( $menu_font_size_tablet, $menu_font_size_tablet_unit ), ), $selector . ' .ast-hb-account-login-form input[type="submit"]' => array( 'font-size' => astra_responsive_font( $popup_button_size, 'tablet' ), ), ); $css_output_mobile = array( $selector . ' .ast-hb-account-login-form label,' . $selector . ' .ast-hb-account-login-form-footer .ast-header-account-footer-link, ' . $selector . ' .ast-hb-account-login-form #loginform input[type=text], ' . $selector . ' .ast-hb-account-login-form #loginform input[type=password]' => array( 'font-size' => astra_responsive_font( $popup_font_size, 'mobile' ), ), $selector . ' .main-header-menu.ast-account-nav-menu .menu-link' => array( 'font-size' => astra_get_font_css_value( $menu_font_size_mobile, $menu_font_size_mobile_unit ), ), $selector . ' .ast-hb-account-login-form input[type="submit"]' => array( 'font-size' => astra_responsive_font( $popup_button_size, 'mobile' ), ), ); $css_output .= astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Footer - Menu - Typography */ if ( Astra_Addon_Builder_Helper::is_component_loaded( 'menu', 'footer' ) ) { $selector = '#astra-footer-menu'; $css_output_desktop = array( $selector . ' .menu-item > a' => astra_addon_get_font_array_css( astra_get_option( 'footer-menu-font-family' ), astra_get_option( 'footer-menu-font-weight' ), array(), 'footer-menu-font-extras' ), ); $css_output .= astra_parse_css( $css_output_desktop ); } /** * Header - Language Switcher - Typography */ if ( Astra_Addon_Builder_Helper::is_component_loaded( 'language-switcher', 'header' ) ) { $_section = 'section-hb-language-switcher'; $selector = '.ast-lswitcher-item-header'; $font_size = astra_get_option( 'font-size-' . $_section ); /** * Typography CSS. */ $css_output_desktop = array( $selector => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $_section ), astra_get_option( 'font-weight-' . $_section ), $font_size, 'font-extras-' . $_section ), ); $css_output_tablet = array( $selector => array( 'font-size' => astra_get_font_css_value( $font_size['tablet'], $font_size['tablet-unit'] ), ), ); $css_output_mobile = array( $selector => array( 'font-size' => astra_get_font_css_value( $font_size['mobile'], $font_size['mobile-unit'] ), ), ); $css_output .= astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Footer - Language Switcher - Typography */ if ( Astra_Addon_Builder_Helper::is_component_loaded( 'language-switcher', 'footer' ) ) { $_section = 'section-fb-language-switcher'; $selector = '.ast-lswitcher-item-footer'; $font_size = astra_get_option( 'font-size-' . $_section ); /** * Typography CSS. */ $css_output_desktop = array( $selector => astra_addon_get_font_array_css( astra_get_option( 'font-family-' . $_section, 'inherit' ), astra_get_option( 'font-weight-' . $_section, 'inherit' ), $font_size, 'font-extras-' . $_section ), ); $css_output_tablet = array( $selector => array( 'font-size' => astra_get_font_css_value( $font_size['tablet'], $font_size['tablet-unit'] ), ), ); $css_output_mobile = array( $selector => array( 'font-size' => astra_get_font_css_value( $font_size['mobile'], $font_size['mobile-unit'] ), ), ); $css_output .= astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Sidebar Widget Title - Typography */ $sidebar_title_font_size = astra_get_option( 'font-size-sidebar-title' ); if ( $sidebar_title_font_size ) { $sidebar_title_font_size_desktop = ( isset( $sidebar_title_font_size['desktop'] ) ) ? $sidebar_title_font_size['desktop'] : ''; $sidebar_title_font_size_tablet = ( isset( $sidebar_title_font_size['tablet'] ) ) ? $sidebar_title_font_size['tablet'] : ''; $sidebar_title_font_size_mobile = ( isset( $sidebar_title_font_size['mobile'] ) ) ? $sidebar_title_font_size['mobile'] : ''; $sidebar_title_font_size_desktop_unit = ( isset( $sidebar_title_font_size['desktop-unit'] ) ) ? $sidebar_title_font_size['desktop-unit'] : ''; $sidebar_title_font_size_tablet_unit = ( isset( $sidebar_title_font_size['tablet-unit'] ) ) ? $sidebar_title_font_size['tablet-unit'] : ''; $sidebar_title_font_size_mobile_unit = ( isset( $sidebar_title_font_size['mobile-unit'] ) ) ? $sidebar_title_font_size['mobile-unit'] : ''; $css_output_common = array( '#secondary .wp-block-group h2:first-of-type' => array( 'font-size' => astra_get_font_css_value( $sidebar_title_font_size_desktop, $sidebar_title_font_size_desktop_unit ), ), ); $css_output_tablet = array( '#secondary .wp-block-group h2:first-of-type' => array( 'font-size' => astra_get_font_css_value( $sidebar_title_font_size_tablet, $sidebar_title_font_size_tablet_unit ), ), ); $css_output_mobile = array( '#secondary .wp-block-group h2:first-of-type' => array( 'font-size' => astra_get_font_css_value( $sidebar_title_font_size_mobile, $sidebar_title_font_size_mobile_unit ), ), ); $css_output .= astra_parse_css( $css_output_common ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Sidebar Widget Content - Typography */ $sidebar_content_font_size = astra_get_option( 'font-size-sidebar-content' ); if ( $sidebar_content_font_size ) { $sidebar_content_font_size_desktop = ( isset( $sidebar_content_font_size['desktop'] ) ) ? $sidebar_content_font_size['desktop'] : ''; $sidebar_content_font_size_tablet = ( isset( $sidebar_content_font_size['tablet'] ) ) ? $sidebar_content_font_size['tablet'] : ''; $sidebar_content_font_size_mobile = ( isset( $sidebar_content_font_size['mobile'] ) ) ? $sidebar_content_font_size['mobile'] : ''; $sidebar_content_font_size_desktop_unit = ( isset( $sidebar_content_font_size['desktop-unit'] ) ) ? $sidebar_content_font_size['desktop-unit'] : ''; $sidebar_content_font_size_tablet_unit = ( isset( $sidebar_content_font_size['tablet-unit'] ) ) ? $sidebar_content_font_size['tablet-unit'] : ''; $sidebar_content_font_size_mobile_unit = ( isset( $sidebar_content_font_size['mobile-unit'] ) ) ? $sidebar_content_font_size['mobile-unit'] : ''; $css_output_common = array( '#secondary .wp-block-group *:not(h2:first-of-type)' => array( 'font-size' => astra_get_font_css_value( $sidebar_content_font_size_desktop, $sidebar_content_font_size_desktop_unit ) . '!important', ), ); $css_output_tablet = array( '#secondary .wp-block-group *:not(h2:first-of-type)' => array( 'font-size' => astra_get_font_css_value( $sidebar_content_font_size_tablet, $sidebar_content_font_size_tablet_unit ) . '!important', ), ); $css_output_mobile = array( '#secondary .wp-block-group *:not(h2:first-of-type)' => array( 'font-size' => astra_get_font_css_value( $sidebar_content_font_size_mobile, $sidebar_content_font_size_mobile_unit ) . '!important', ), ); $css_output .= astra_parse_css( $css_output_common ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } /** * Header - Mobile Trigger - Typography */ /** * Typography CSS. */ $css_output_desktop = array( '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu' => astra_addon_get_font_array_css( astra_get_option( 'mobile-header-label-font-family' ), astra_get_option( 'mobile-header-label-font-weight' ), array(), 'mobile-header-label-font-extras' ), ); $css_output .= astra_parse_css( $css_output_desktop ); /** * Mobile Menu - Typography. */ $_section = 'section-header-mobile-menu'; $selector = '.ast-hfb-header .ast-builder-menu-mobile .main-header-menu'; if ( version_compare( ASTRA_THEME_VERSION, '3.2.0', '<' ) ) { $selector = '.astra-hfb-header .ast-builder-menu-mobile .main-header-menu'; } $sub_menu_font_size = astra_get_option( 'header-font-size-mobile-menu-sub-menu' ); $sub_menu_font_size_desktop = ( isset( $sub_menu_font_size['desktop'] ) ) ? $sub_menu_font_size['desktop'] : ''; $sub_menu_font_size_tablet = ( isset( $sub_menu_font_size['tablet'] ) ) ? $sub_menu_font_size['tablet'] : ''; $sub_menu_font_size_mobile = ( isset( $sub_menu_font_size['mobile'] ) ) ? $sub_menu_font_size['mobile'] : ''; $sub_menu_font_size_desktop_unit = ( isset( $sub_menu_font_size['desktop-unit'] ) ) ? $sub_menu_font_size['desktop-unit'] : ''; $sub_menu_font_size_tablet_unit = ( isset( $sub_menu_font_size['tablet-unit'] ) ) ? $sub_menu_font_size['tablet-unit'] : ''; $sub_menu_font_size_mobile_unit = ( isset( $sub_menu_font_size['mobile-unit'] ) ) ? $sub_menu_font_size['mobile-unit'] : ''; $css_output_common = array( $selector . ' .sub-menu .menu-link' => astra_addon_get_font_array_css( astra_get_option( 'header-font-family-mobile-menu-sub-menu' ), astra_get_option( 'header-font-weight-mobile-menu-sub-menu' ), array(), 'font-extras-mobile-menu-sub-menu' ), $selector . '.ast-nav-menu .sub-menu .menu-item .menu-link' => array( 'font-size' => astra_get_font_css_value( $sub_menu_font_size_desktop, $sub_menu_font_size_desktop_unit ), ), ); $css_output_tablet = array( $selector . '.ast-nav-menu .sub-menu .menu-item .menu-link' => array( 'font-size' => astra_get_font_css_value( $sub_menu_font_size_tablet, $sub_menu_font_size_tablet_unit ), ), ); $css_output_mobile = array( $selector . '.ast-nav-menu .sub-menu .menu-item .menu-link' => array( 'font-size' => astra_get_font_css_value( $sub_menu_font_size_mobile, $sub_menu_font_size_mobile_unit ), ), ); $css_output .= astra_parse_css( $css_output_common ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_addon_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_addon_get_mobile_breakpoint() ); } return $dynamic_css . $css_output; } /** * Conditionally iclude CSS Selectors with anchors in the typography settings. * * Historically Astra adds Colors/Typography CSS for headings and anchors for headings but this causes irregularities with the expected output. * For eg Link color does not work for the links inside headings. * * If filter `astra_include_achors_in_headings_typography` is set to true or Astra Option `include-headings-in-typography` is set to true, This will return selectors with anchors. Else This will return selectors without anchors. * * @since 1.5.0 * @param String $selectors_with_achors CSS Selectors with anchors. * @param String $selectors_without_achors CSS Selectors withour annchors. * * @return String CSS Selectors based on the condition of filters. */ function astra_addon_typography_conditional_headings_css_selectors( $selectors_with_achors, $selectors_without_achors ) { if ( true == astra_addon_typography_anchors_in_css_selectors_heading() ) { return $selectors_with_achors; } else { return $selectors_without_achors; } } /** * Check if CSS selectors in Headings should use anchors. * * @since 1.5.0 * @return boolean true if it should include anchors, False if not. */ function astra_addon_typography_anchors_in_css_selectors_heading() { if ( true == astra_get_option( 'include-headings-in-typography' ) && true === apply_filters( 'astra_include_achors_in_headings_typography', true ) ) { return true; } else { return false; } } classes/class-astra-ext-typography-loader.php 0000666 00000076742 15165520225 0015424 0 ustar 00 <?php /** * Typography - Customizer. * * @package Astra Addon * @since 1.0.0 */ if ( ! class_exists( 'Astra_Ext_Typography_Loader' ) ) { /** * Customizer Initialization * * @since 1.0.0 */ // @codingStandardsIgnoreStart class Astra_Ext_Typography_Loader { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound // @codingStandardsIgnoreEnd /** * Member Variable * * @var instance */ private static $instance; /** * Initiator */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_action( 'init', array( $this, 'disale_qm_cap_checking' ) ); add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) ); add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 9 ); add_action( 'customize_register', array( $this, 'customize_register_new' ), 2 ); add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); add_filter( 'uabb_theme_button_font_family', array( $this, 'button_font_family' ), 11 ); add_filter( 'uabb_theme_button_font_size', array( $this, 'button_font_size' ), 11 ); add_filter( 'uabb_theme_button_text_transform', array( $this, 'button_text_transform' ), 11 ); } /** * Add Font Family Callback * * @return void */ public function add_fonts() { $font_family_header_content = astra_get_option( 'font-family-header-content' ); $font_weight_header_content = astra_get_option( 'font-weight-header-content' ); Astra_Fonts::add_font( $font_family_header_content, $font_weight_header_content ); $font_family_site_title = astra_get_option( 'font-family-site-title' ); $font_weight_site_title = astra_get_option( 'font-weight-site-title' ); Astra_Fonts::add_font( $font_family_site_title, $font_weight_site_title ); $font_family_site_tagline = astra_get_option( 'font-family-site-tagline' ); $font_weight_site_tagline = astra_get_option( 'font-weight-site-tagline' ); Astra_Fonts::add_font( $font_family_site_tagline, $font_weight_site_tagline ); $font_family_primary_menu = astra_get_option( 'font-family-primary-menu' ); $font_weight_primary_menu = astra_get_option( 'font-weight-primary-menu' ); Astra_Fonts::add_font( $font_family_primary_menu, $font_weight_primary_menu ); $font_family_primary_dropdown_menu = astra_get_option( 'font-family-primary-dropdown-menu' ); $font_weight_primary_dropdown_menu = astra_get_option( 'font-weight-primary-dropdown-menu' ); Astra_Fonts::add_font( $font_family_primary_dropdown_menu, $font_weight_primary_dropdown_menu ); $font_family_archive_page_title = astra_get_option( 'font-family-page-title' ); $font_weight_archive_page_title = astra_get_option( 'font-weight-page-title' ); Astra_Fonts::add_font( $font_family_archive_page_title, $font_weight_archive_page_title ); $font_family_post_meta = astra_get_option( 'font-family-post-meta' ); $font_weight_post_meta = astra_get_option( 'font-weight-post-meta' ); Astra_Fonts::add_font( $font_family_post_meta, $font_weight_post_meta ); $font_family_widget_title = astra_get_option( 'font-family-widget-title' ); $font_weight_widget_title = astra_get_option( 'font-weight-widget-title' ); Astra_Fonts::add_font( $font_family_widget_title, $font_weight_widget_title ); $font_family_widget_content = astra_get_option( 'font-family-widget-content' ); $font_weight_widget_content = astra_get_option( 'font-weight-widget-content' ); Astra_Fonts::add_font( $font_family_widget_content, $font_weight_widget_content ); $font_family_footer_content = astra_get_option( 'font-family-footer-content' ); $font_weight_footer_content = astra_get_option( 'font-weight-footer-content' ); Astra_Fonts::add_font( $font_family_footer_content, $font_weight_footer_content ); $font_family_button = astra_get_option( 'font-family-button' ); $font_weight_button = astra_get_option( 'font-weight-button' ); Astra_Fonts::add_font( $font_family_button, $font_weight_button ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { /** * Footer - Copyright */ if ( Astra_Addon_Builder_Helper::is_component_loaded( 'copyright', 'footer' ) ) { $copyright_font_family = astra_get_option( 'font-family-section-footer-copyright' ); $copyright_font_weight = astra_get_option( 'font-weight-section-footer-copyright' ); Astra_Fonts::add_font( $copyright_font_family, $copyright_font_weight ); } /** * Header - Account */ if ( Astra_Addon_Builder_Helper::is_component_loaded( 'account', 'header' ) ) { $account_font_family = astra_get_option( 'font-family-section-header-account' ); $account_font_weight = astra_get_option( 'font-weight-section-header-account' ); Astra_Fonts::add_font( $account_font_family, $account_font_weight ); $account_menu_font_family = astra_get_option( 'section-header-account-menu-font-family' ); $account_menu_font_weight = astra_get_option( 'section-header-account-menu-font-weight' ); Astra_Fonts::add_font( $account_menu_font_family, $account_menu_font_weight ); } /** * Footer - HTML */ $num_of_footer_html = astra_addon_builder_helper()->num_of_footer_html; for ( $index = 1; $index <= $num_of_footer_html; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'html-' . $index, 'footer' ) ) { continue; } $_prefix = 'section-fb-html-' . $index; $html_font_family = astra_get_option( 'font-family-' . $_prefix ); $html_font_weight = astra_get_option( 'font-weight-' . $_prefix ); Astra_Fonts::add_font( $html_font_family, $html_font_weight ); } /** * Header - HTML */ $num_of_header_html = astra_addon_builder_helper()->num_of_header_html; for ( $index = 1; $index <= $num_of_header_html; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'html-' . $index, 'header' ) ) { continue; } $_prefix = 'section-hb-html-' . $index; $html_font_family = astra_get_option( 'font-family-' . $_prefix ); $html_font_weight = astra_get_option( 'font-weight-' . $_prefix ); Astra_Fonts::add_font( $html_font_family, $html_font_weight ); } /** * Footer - Social */ $num_of_footer_social_icons = astra_addon_builder_helper()->num_of_footer_social_icons; for ( $index = 1; $index <= $num_of_footer_social_icons; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'social-icons-' . $index, 'footer' ) ) { continue; } $_prefix = 'section-fb-social-icons-' . $index; $social_footer_font_family = astra_get_option( 'font-family-' . $_prefix ); $social_footer_font_weight = astra_get_option( 'font-weight-' . $_prefix ); Astra_Fonts::add_font( $social_footer_font_family, $social_footer_font_weight ); } /** * Header - Social */ $num_of_header_social_icons = astra_addon_builder_helper()->num_of_header_social_icons; for ( $index = 1; $index <= $num_of_header_social_icons; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'social-icons-' . $index, 'header' ) ) { continue; } $_prefix = 'section-hb-social-icons-' . $index; $social_header_font_family = astra_get_option( 'font-family-' . $_prefix ); $social_header_font_weight = astra_get_option( 'font-weight-' . $_prefix ); Astra_Fonts::add_font( $social_header_font_family, $social_header_font_weight ); } /** * Header - Widgets */ $num_of_header_widgets = astra_addon_builder_helper()->num_of_header_widgets; for ( $index = 1; $index <= $num_of_header_widgets; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'widget-' . $index, 'header' ) ) { continue; } $_prefix = 'widget-' . $index; $widget_font_family = astra_get_option( 'header-' . $_prefix . '-font-family' ); $widget_font_weight = astra_get_option( 'header-' . $_prefix . '-font-weight' ); Astra_Fonts::add_font( $widget_font_family, $widget_font_weight ); $widget_content_font_family = astra_get_option( 'header-' . $_prefix . '-content-font-family' ); $widget_content_font_weight = astra_get_option( 'header-' . $_prefix . '-content-font-weight' ); Astra_Fonts::add_font( $widget_content_font_family, $widget_content_font_weight ); } /** * Footer - Widgets */ $num_of_footer_widgets = astra_addon_builder_helper()->num_of_footer_widgets; for ( $index = 1; $index <= $num_of_footer_widgets; $index++ ) { if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'widget-' . $index, 'footer' ) ) { continue; } $_prefix = 'widget-' . $index; $widget_font_family = astra_get_option( 'footer-' . $_prefix . '-font-family' ); $widget_font_weight = astra_get_option( 'footer-' . $_prefix . '-font-weight' ); Astra_Fonts::add_font( $widget_font_family, $widget_font_weight ); $widget_content_font_family = astra_get_option( 'footer-' . $_prefix . '-content-font-family' ); $widget_content_font_weight = astra_get_option( 'footer-' . $_prefix . '-content-font-weight' ); Astra_Fonts::add_font( $widget_content_font_family, $widget_content_font_weight ); } /** * Mobile Trigger */ $header_menu_trigger_font_family = astra_get_option( 'mobile-header-label-font-family' ); $header_menu_trigger_font_weight = astra_get_option( 'mobile-header-label-font-weight' ); Astra_Fonts::add_font( $header_menu_trigger_font_family, $header_menu_trigger_font_weight ); /** * Header - Menu */ $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $_prefix = 'menu' . $index; $submenu_font_family = astra_get_option( 'header-font-family-' . $_prefix . '-sub-menu' ); $submenu_font_weight = astra_get_option( 'header-font-weight-' . $_prefix . '-sub-menu' ); Astra_Fonts::add_font( $submenu_font_family, $submenu_font_weight ); if ( 3 > $index ) { $megamenu_font_family = astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-family' ); $megamenu_font_weight = astra_get_option( 'header-' . $_prefix . '-megamenu-heading-font-weight' ); Astra_Fonts::add_font( $megamenu_font_family, $megamenu_font_weight ); } } /** * Footer Menu */ $footer_menu_font_family = astra_get_option( 'footer-menu-font-family' ); $footer_menu_font_weight = astra_get_option( 'footer-menu-font-weight' ); Astra_Fonts::add_font( $footer_menu_font_family, $footer_menu_font_weight ); /** * Mobile menu */ $submenu_font_family = astra_get_option( 'header-mobile-menu-sub-menu-font-family' ); $submenu_font_weight = astra_get_option( 'header-mobile-menu-sub-menu-font-weight' ); Astra_Fonts::add_font( $submenu_font_family, $submenu_font_weight ); /** * Header - Language Switcher */ $header_lang_switcher_font_family = astra_get_option( 'font-family-section-hb-language-switcher' ); $header_lang_switcher_font_weight = astra_get_option( 'font-weight-section-hb-language-switcher' ); Astra_Fonts::add_font( $header_lang_switcher_font_family, $header_lang_switcher_font_weight ); /** * Footer - Language Switcher */ $footer_lang_switcher_font_family = astra_get_option( 'font-family-section-fb-language-switcher' ); $footer_lang_switcher_font_weight = astra_get_option( 'font-weight-section-fb-language-switcher' ); Astra_Fonts::add_font( $footer_lang_switcher_font_family, $footer_lang_switcher_font_weight ); } } /** * Set Options Default Values * * @param array $defaults Astra options default value array. * @return array */ public function theme_defaults( $defaults ) { $astra_options = is_callable( 'Astra_Theme_Options::get_astra_options' ) ? Astra_Theme_Options::get_astra_options() : get_option( ASTRA_THEME_SETTINGS ); $apply_new_default_color_typo_values = is_callable( 'Astra_Dynamic_CSS::astra_check_default_color_typo' ) ? Astra_Dynamic_CSS::astra_check_default_color_typo() : false; // Header. $defaults['font-family-site-title'] = 'inherit'; $defaults['font-weight-site-title'] = 'inherit'; $defaults['font-extras-site-title'] = array( 'line-height' => ! isset( $astra_options['font-extras-site-title'] ) && isset( $astra_options['line-height-site-title'] ) ? $astra_options['line-height-site-title'] : '1.23', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-site-title'] ) && isset( $astra_options['text-transform-site-title'] ) ? $astra_options['text-transform-site-title'] : '', 'text-decoration' => '', ); $defaults['font-family-site-tagline'] = 'inherit'; $defaults['font-weight-site-tagline'] = 'inherit'; $defaults['font-extras-site-tagline'] = array( 'line-height' => ! isset( $astra_options['font-extras-site-tagline'] ) && isset( $astra_options['line-height-site-tagline'] ) ? $astra_options['line-height-site-tagline'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-site-tagline'] ) && isset( $astra_options['text-transform-site-tagline'] ) ? $astra_options['text-transform-site-tagline'] : '', 'text-decoration' => '', ); // Primary Menu. $defaults['font-size-primary-menu'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-weight-primary-menu'] = 'inherit'; $defaults['font-family-primary-menu'] = 'inherit'; $defaults['text-transform-primary-menu'] = ''; $defaults['line-height-primary-menu'] = ''; // Primary Dropdown Menu. $defaults['font-size-primary-dropdown-menu'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-family-primary-dropdown-menu'] = 'inherit'; $defaults['font-weight-primary-dropdown-menu'] = 'inherit'; $defaults['text-transform-primary-dropdown-menu'] = ''; $defaults['line-height-primary-dropdown-menu'] = ''; // Archive Summary Box. $defaults['font-family-archive-summary-title'] = 'inherit'; $defaults['font-weight-archive-summary-title'] = 'inherit'; $defaults['font-extras-archive-summary-title'] = array( 'line-height' => ! isset( $astra_options['font-extras-archive-summary-title'] ) && isset( $astra_options['line-height-archive-summary-title'] ) ? $astra_options['line-height-archive-summary-title'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-archive-summary-title'] ) && isset( $astra_options['text-transform-archive-summary-title'] ) ? $astra_options['text-transform-archive-summary-title'] : '', 'text-decoration' => '', ); // Archive. $defaults['font-family-page-title'] = 'inherit'; $defaults['font-weight-page-title'] = $apply_new_default_color_typo_values ? '500' : 'inherit'; $defaults['font-extras-page-title'] = array( 'line-height' => ! isset( $astra_options['font-extras-page-title'] ) && isset( $astra_options['line-height-page-title'] ) ? $astra_options['line-height-page-title'] : '1.23', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-page-title'] ) && isset( $astra_options['text-transform-page-title'] ) ? $astra_options['text-transform-page-title'] : '', 'text-decoration' => '', ); $defaults['font-size-post-meta'] = array( 'desktop' => $apply_new_default_color_typo_values ? 16 : '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-family-post-meta'] = 'inherit'; $defaults['font-weight-post-meta'] = 'inherit'; $defaults['font-extras-post-meta'] = array( 'line-height' => ! isset( $astra_options['font-extras-post-meta'] ) && isset( $astra_options['line-height-post-meta'] ) ? $astra_options['line-height-post-meta'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-post-meta'] ) && isset( $astra_options['text-transform-post-meta'] ) ? $astra_options['text-transform-post-meta'] : '', 'text-decoration' => '', ); $defaults['font-size-post-pagination'] = array( 'desktop' => $apply_new_default_color_typo_values ? 16 : '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['text-transform-post-pagination'] = ''; // Single. $defaults['font-family-entry-title'] = 'inherit'; $defaults['font-weight-entry-title'] = 'inherit'; $defaults['font-extras-entry-title'] = array( 'line-height' => ! isset( $astra_options['font-extras-entry-title'] ) && isset( $astra_options['line-height-entry-title'] ) ? $astra_options['line-height-entry-title'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-entry-title'] ) && isset( $astra_options['text-transform-entry-title'] ) ? $astra_options['text-transform-entry-title'] : '', 'text-decoration' => '', ); // Button. $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-weight-button'] = $apply_new_default_color_typo_values ? '500' : 'inherit'; $defaults['font-family-button'] = 'inherit'; // Sidebar. $defaults['font-size-widget-title'] = array( 'desktop' => $apply_new_default_color_typo_values ? 26 : '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-size-sidebar-title'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-family-widget-title'] = 'inherit'; $defaults['font-weight-widget-title'] = 'inherit'; $defaults['font-extras-widget-title'] = array( 'line-height' => ! isset( $astra_options['font-extras-widget-title'] ) && isset( $astra_options['line-height-widget-title'] ) ? $astra_options['line-height-widget-title'] : '1.23', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-widget-title'] ) && isset( $astra_options['text-transform-widget-title'] ) ? $astra_options['text-transform-widget-title'] : '', 'text-decoration' => '', ); $defaults['font-size-widget-content'] = array( 'desktop' => $apply_new_default_color_typo_values ? 16 : '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-size-sidebar-content'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'em', 'tablet-unit' => 'em', 'mobile-unit' => 'em', ); $defaults['font-family-widget-content'] = 'inherit'; $defaults['font-weight-widget-content'] = 'inherit'; $defaults['line-height-widget-content'] = ''; $defaults['font-extras-widget-content'] = array( 'line-height' => ! isset( $astra_options['font-extras-widget-content'] ) && isset( $astra_options['line-height-widget-content'] ) ? $astra_options['line-height-widget-content'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-widget-content'] ) && isset( $astra_options['text-transform-widget-content'] ) ? $astra_options['text-transform-widget-content'] : '', 'text-decoration' => '', ); // Footer. $defaults['font-size-footer-content'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-family-footer-content'] = 'inherit'; $defaults['font-weight-footer-content'] = 'inherit'; $defaults['text-transform-footer-content'] = ''; $defaults['line-height-footer-content'] = ''; // Header <H1>. $defaults['font-family-h1'] = 'inherit'; $defaults['font-weight-h1'] = 'inherit'; $defaults['text-transform-h1'] = ''; $defaults['line-height-h1'] = ''; // Header <H2>. $defaults['font-family-h2'] = 'inherit'; $defaults['font-weight-h2'] = 'inherit'; $defaults['text-transform-h2'] = ''; $defaults['line-height-h2'] = ''; // Header <H3>. $defaults['font-family-h3'] = 'inherit'; $defaults['font-weight-h3'] = 'inherit'; $defaults['text-transform-h3'] = ''; $defaults['line-height-h3'] = ''; // Outside Menu Item. $defaults['outside-menu-font-size'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['outside-menu-line-height'] = ''; $defaults['section-header-account-menu-font-size'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['section-header-account-popup-font-size'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['section-header-account-popup-button-font-size'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-size-section-hb-language-switcher'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-size-section-fb-language-switcher'] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults['font-family-section-hb-language-switcher'] = 'inherit'; $defaults['font-family-section-fb-language-switcher'] = 'inherit'; $defaults['font-extras-section-hb-language-switcher'] = array( 'line-height' => ! isset( $astra_options['font-extras-section-hb-language-switcher'] ) && isset( $astra_options['line-height-section-hb-language-switcher'] ) ? $astra_options['line-height-section-hb-language-switcher'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-section-hb-language-switcher'] ) && isset( $astra_options['text-transform-section-hb-language-switcher'] ) ? $astra_options['text-transform-section-hb-language-switcher'] : '', 'text-decoration' => '', ); $defaults['font-extras-section-fb-language-switcher'] = array( 'line-height' => ! isset( $astra_options['font-extras-section-fb-language-switcher'] ) && isset( $astra_options['line-height-section-fb-language-switcher'] ) ? $astra_options['line-height-section-fb-language-switcher'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-section-fb-language-switcher'] ) && isset( $astra_options['text-transform-section-fb-language-switcher'] ) ? $astra_options['text-transform-section-fb-language-switcher'] : '', 'text-decoration' => '', ); $defaults['font-extras-section-footer-copyright'] = array( 'line-height' => ! isset( $astra_options['font-extras-section-footer-copyright'] ) && isset( $astra_options['line-height-section-footer-copyright'] ) ? $astra_options['line-height-section-footer-copyright'] : '', 'line-height-unit' => 'em', 'letter-spacing' => '', 'letter-spacing-unit' => 'px', 'text-transform' => ! isset( $astra_options['font-extras-section-footer-copyright'] ) && isset( $astra_options['text-transform-section-footer-copyright'] ) ? $astra_options['text-transform-section-footer-copyright'] : '', 'text-decoration' => '', ); /** * Footer > Social Icon Defaults. */ $num_of_footer_social_icons = astra_addon_builder_helper()->num_of_footer_social_icons; for ( $index = 1; $index <= $num_of_footer_social_icons; $index++ ) { $defaults[ 'font-family-section-fb-social-icons-' . $index ] = 'inherit'; $defaults[ 'font-weight-section-fb-social-icons-' . $index ] = 'inherit'; $defaults[ 'text-transform-section-fb-social-icons-' . $index ] = ''; $defaults[ 'line-height-section-fb-social-icons-' . $index ] = ''; } /** * Header > Social Icon Defaults. */ $component_limit = astra_addon_builder_helper()->component_limit; for ( $index = 1; $index <= $component_limit; $index++ ) { $defaults = $this->prepare_social_icons_defaults( $defaults, $index ); } return $defaults; } /** * Prepare Social Icons Defaults. * * @param array $defaults defaults. * @param integer $index index. * @return array * @since 3.1.0 */ public function prepare_social_icons_defaults( $defaults, $index ) { $defaults[ 'font-family-section-hb-social-icons-' . $index ] = 'inherit'; $defaults[ 'font-weight-section-hb-social-icons-' . $index ] = 'inherit'; $defaults[ 'text-transform-section-hb-social-icons-' . $index ] = ''; $defaults[ 'line-height-section-hb-social-icons-' . $index ] = ''; return $defaults; } /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ public function customize_register_new( $wp_customize ) { /** * Register Sections & Panels */ require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/class-astra-typo-panel-section-configs.php'; require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/sections/class-astra-archive-advanced-typo-configs.php'; require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/sections/class-astra-site-header-typo-configs.php'; if ( astra_addon_existing_header_footer_configs() ) { require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/sections/class-astra-primary-menu-typo-configs.php'; require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/sections/class-astra-footer-typo-configs.php'; } require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/sections/class-astra-sidebar-typo-configs.php'; require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/sections/class-astra-builder-menu-configs.php'; require_once ASTRA_ADDON_EXT_TYPOGRAPHY_DIR . 'classes/sections/class-astra-header-builder-typo-configs.php'; } /** * Customizer Preview */ public function preview_scripts() { if ( SCRIPT_DEBUG ) { wp_enqueue_script( 'astra-ext-typography-customize-preview-js', ASTRA_ADDON_EXT_TYPOGRAPHY_URI . 'assets/js/unminified/customizer-preview.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); } else { wp_enqueue_script( 'astra-ext-typography-customize-preview-js', ASTRA_ADDON_EXT_TYPOGRAPHY_URI . 'assets/js/minified/customizer-preview.min.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_EXT_VER, true ); } $localize_array = array( 'includeAnchorsInHeadindsCss' => astra_addon_typography_anchors_in_css_selectors_heading(), 'addon_page_builder_button_style_css' => Astra_Addon_Update_Filter_Function::page_builder_addon_button_style_css(), 'component_limit' => astra_addon_builder_helper()->component_limit, 'is_flex_based_css' => Astra_Addon_Builder_Helper::apply_flex_based_css(), 'astra_not_updated' => version_compare( ASTRA_THEME_VERSION, '3.2.0', '<' ), 'font_weight_support_widget_title' => Astra_Addon_Update_Filter_Function::support_addon_font_css_to_widget_and_in_editor(), ); wp_localize_script( 'astra-ext-typography-customize-preview-js', 'astTypography', $localize_array ); } /** * Button Font Family */ public function button_font_family() { $font_family = str_replace( "'", '', astra_get_option( 'font-family-button' ) ); $font_family = explode( ',', $font_family ); return array( 'family' => $font_family[0], 'weight' => astra_get_option( 'font-weight-button' ), ); } /** * Button Font Size */ public function button_font_size() { $font_size = astra_get_option( 'font-size-button' ); $font_size_number = $font_size['desktop']; $font_size_unit = $font_size['desktop-unit']; return $font_size_number . $font_size_unit; } /** * Button Text Transform */ public function button_text_transform() { return astra_addon_get_font_extras( astra_get_option( 'font-extras-button' ), 'text-transform' ); } /** * Typography Param loads all the available Google fonts from the Json. * The Google Fonts list is generated usig a Grunt Command so this list will keep on increasing in future. * * When Typography param and Query Monitor is active, Both of these cause a lot of memory consumption. Particularly `QM_Collector_Caps->filter_user_has_cap` * Hence we are disaling this method only when inside the Customizer Preview. This is not affected anywhere else on the site, Front End or Admin. * * @since 1.1.0 */ public function disale_qm_cap_checking() { if ( class_exists( 'QM_Collector_Caps' ) && is_customize_preview() ) { $qm_caps = QM_Collectors::get( 'caps' ); remove_filter( 'user_has_cap', array( $qm_caps, 'filter_user_has_cap' ), 9999, 3 ); } } } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Ext_Typography_Loader::get_instance(); assets/js/minified/customizer-preview.min.js 0000666 00000040646 15165520225 0015272 0 ustar 00 !function(){astra_responsive_font_size("astra-settings[font-size-primary-menu]",".main-navigation, .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items"),astra_responsive_font_size("astra-settings[font-size-post-meta]",".entry-meta, .read-more"),astra_responsive_font_size("astra-settings[font-size-post-pagination]",".ast-pagination .page-numbers, .ast-pagination .page-navigation"),astra_responsive_font_size("astra-settings[font-size-widget-title]",".secondary .widget-title, .woocommerce-page #secondary .widget .widget-title"),astra_responsive_font_size("astra-settings[font-size-widget-content]",".secondary .widget > *:not(.widget-title)"),astra_responsive_font_size("astra-settings[font-size-footer-content]",".ast-small-footer"),astra_generate_outside_font_family_css("astra-settings[font-family-archive-summary-title]",".ast-archive-description .ast-archive-title"),astra_generate_font_weight_css("astra-settings[font-family-archive-summary-title]","astra-settings[font-weight-archive-summary-title]","font-weight",".ast-archive-description .ast-archive-title"),astra_font_extras_css("font-extras-archive-summary-title",".ast-archive-description .ast-archive-title"),astra_generate_outside_font_family_css("astra-settings[font-family-page-title]",".blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a"),astra_generate_font_weight_css("astra-settings[font-family-page-title]","astra-settings[font-weight-page-title]","font-weight",".blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a"),astra_css("astra-settings[font-weight-page-title]","font-weight",".blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a"),astra_font_extras_css("font-extras-page-title",".blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a"),astra_generate_outside_font_family_css("astra-settings[font-family-entry-title]",".ast-single-post .entry-title, .page-title"),astra_generate_font_weight_css("astra-settings[font-family-entry-title]","astra-settings[font-weight-entry-title]","font-weight",".ast-single-post .entry-title, .page-title"),astra_font_extras_css("font-extras-entry-title",".ast-single-post .entry-title, .page-title"),astra_generate_outside_font_family_css("astra-settings[font-family-post-meta]",".entry-meta, .read-more"),astra_generate_font_weight_css("astra-settings[font-family-post-meta]","astra-settings[font-weight-post-meta]","font-weight",".entry-meta, .read-more"),astra_font_extras_css("font-extras-post-meta",".entry-meta, .read-more"),astra_css("astra-settings[text-transform-post-pagination]","text-transform",".ast-pagination .page-numbers, .ast-pagination .page-navigation"),astra_css("astra-settings[line-height-footer-content]","line-height",".ast-small-footer"),astra_css("astra-settings[text-transform-footer-content]","text-transform",".ast-small-footer"),astra_font_extras_css("font-extras-site-title",".site-title a"),astra_font_extras_css("font-extras-site-tagline",".site-header .site-description"),astra_font_extras_css("font-extras-widget-title",".secondary .widget-title, .woocommerce-page #secondary .widget .widget-title"),astra_responsive_font_size("astra-settings[font-size-button]",'button, .ast-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]'),astra_css("astra-settings[outside-menu-line-height]","line-height",".ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *");var t=".main-navigation",t=(""!=ast_enabled_addons["header-sections"]&&(t+=", .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items"),astra_generate_outside_font_family_css("astra-settings[font-family-primary-menu]",t),".main-navigation"),t=(""!=ast_enabled_addons["header-sections"]&&(t+=", .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items"),astra_css("astra-settings[font-weight-primary-menu]","font-weight",t),".main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type"),t=(astra_generate_outside_font_family_css("astra-settings[font-family-primary-dropdown-menu]",t),astra_css("astra-settings[text-transform-primary-menu]","text-transform",".main-header-bar .main-header-bar-navigation"),astra_responsive_font_size("astra-settings[font-size-primary-menu]",".main-navigation, .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items"),astra_css("astra-settings[line-height-primary-menu]","line-height",".main-header-bar"),astra_css("astra-settings[font-weight-primary-dropdown-menu]","font-weight",".main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type"),astra_css("astra-settings[text-transform-primary-dropdown-menu]","text-transform",".main-header-bar .main-header-bar-navigation .sub-menu, .ast-header-sections-navigation .sub-menu, .ast-above-header-menu-items .sub-menu, .ast-below-header-menu-items .sub-menu"),astra_responsive_font_size("astra-settings[font-size-primary-dropdown-menu]",".main-header-menu > .menu-item > .sub-menu:first-of-type, .ast-header-sections-navigation li > .sub-menu:first-of-type, .ast-above-header-menu-items .menu-item > .sub-menu:first-of-type, .ast-below-header-menu-items li > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type"),astra_css("astra-settings[line-height-primary-dropdown-menu]","line-height",".main-header-bar .main-header-bar-navigation .sub-menu, .ast-header-sections-navigation .sub-menu, .ast-above-header-menu-items .sub-menu, .ast-below-header-menu-items .sub-menu"),".main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type");astra_generate_outside_font_family_css("astra-settings[font-family-footer-content]",".ast-small-footer"),astra_css("astra-settings[font-weight-footer-content]","font-weight",".ast-small-footer"),astra_css("astra-settings[text-transform-footer-content]","text-transform",".ast-small-footer"),astra_responsive_font_size("astra-settings[font-size-footer-content]",".ast-small-footer"),astra_css("astra-settings[line-height-footer-content]","line-height",".ast-small-footer"),astra_generate_outside_font_family_css("astra-settings[font-family-widget-title]",".secondary .widget-title, .woocommerce-page #secondary .widget .widget-title"),astra_generate_font_weight_css("astra-settings[font-family-widget-title]","astra-settings[font-weight-widget-title]","font-weight",".secondary .widget-title, .woocommerce-page #secondary .widget .widget-title"),astra_responsive_font_size("astra-settings[font-size-widget-title]",".secondary .widget-title, .woocommerce-page #secondary .widget .widget-title"),astra_generate_outside_font_family_css("astra-settings[font-family-widget-content]",".secondary .widget > *:not(.widget-title)"),astra_generate_font_weight_css("astra-settings[font-family-widget-content]","astra-settings[font-weight-widget-content]","font-weight",".secondary .widget > *:not(.widget-title)"),astra_responsive_font_size("astra-settings[font-size-widget-content]",".secondary .widget > *:not(.widget-title)"),astra_font_extras_css("font-extras-widget-content",".secondary .widget > *:not(.widget-title)"),astra_responsive_font_size("astra-settings[outside-menu-font-size]",".ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *"),astra_css("astra-settings[outside-menu-line-height]","line-height",".ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *");for(var e=1;e<=astTypography.component_limit;e++){var a="menu"+e,t=".ast-hfb-header .ast-builder-menu-"+e+".ast-builder-menu .main-header-menu";astTypography.astra_not_updated&&(t=".astra-hfb-header .ast-builder-menu-"+e+".ast-builder-menu .main-header-menu"),astra_generate_outside_font_family_css("astra-settings[header-font-family-"+a+"-sub-menu]",t+" .sub-menu .menu-item .menu-link"),astra_generate_font_weight_css("astra-settings[header-font-family-"+a+"-sub-menu]","astra-settings[header-font-weight-"+a+"-sub-menu]","font-weight",t+" .sub-menu .menu-item .menu-link"),astra_responsive_font_size("astra-settings[header-font-size-"+a+"-sub-menu]",t+" .sub-menu .menu-item .menu-link"),astra_font_extras_css("header-font-extras-"+a+"-sub-menu",t+" .sub-menu .menu-item .menu-link"),e<3&&(astra_generate_outside_font_family_css("astra-settings[header-"+a+"-megamenu-heading-font-family]",t+" .menu-item.menu-item-heading > .menu-link"),astra_generate_font_weight_css("astra-settings[header-"+a+"-megamenu-heading-font-family]","astra-settings[header-"+a+"-megamenu-heading-font-weight]","font-weight",t+" .menu-item.menu-item-heading > .menu-link"),astra_responsive_font_size("astra-settings[header-"+a+"-megamenu-heading-font-size]",t+" .menu-item.menu-item-heading > .menu-link"),astra_font_extras_css("header-"+a+"-megamenu-heading-font-extras",t+" .menu-item.menu-item-heading > .menu-link"))}t=".ast-hfb-header .ast-builder-menu-mobile .main-header-menu";astTypography.astra_not_updated&&(t=".astra-hfb-header .ast-builder-menu-mobile .main-header-menu"),astra_generate_outside_font_family_css("astra-settings[header-font-family-mobile-menu-sub-menu]",t+" .sub-menu .menu-item .menu-link"),astra_generate_font_weight_css("astra-settings[header-font-family-mobile-menu-sub-menu]","astra-settings[header-font-weight-mobile-menu-sub-menu]","font-weight",t+" .sub-menu .menu-item .menu-link"),astra_responsive_font_size("astra-settings[header-font-size-mobile-menu-sub-menu]",t+".ast-nav-menu .sub-menu .menu-item .menu-link"),astra_font_extras_css("font-extras-mobile-menu-sub-menu",".ast-hfb-header .ast-builder-menu-mobile .main-header-menu .sub-menu .menu-item .menu-link");for(var s,n,i,e=1;e<=astTypography.component_limit;e++){i=void 0,i="section-hb-html-"+(n=e),n=".site-header-section .ast-builder-layout-element.ast-header-html-"+n+" .ast-builder-html-element",astra_generate_outside_font_family_css("astra-settings[font-family-"+i+"]",n),astra_generate_font_weight_css("astra-settings[font-family-"+i+"]","astra-settings[font-weight-"+i+"]","font-weight",n),astra_font_extras_css("font-extras-"+i,n),n=i=n=i=void 0,i="section-hb-social-icons-"+(s=e),n=".ast-builder-layout-element .ast-header-social-"+s+"-wrap",astra_generate_outside_font_family_css("astra-settings[font-family-"+i+"]",n),astra_generate_font_weight_css("astra-settings[font-family-"+i+"]","astra-settings[font-weight-"+i+"]","font-weight",n),astra_font_extras_css("font-extras-"+i,n),i="section-fb-social-icons-"+s,n=".ast-builder-layout-element .ast-footer-social-"+s+"-wrap",astra_generate_outside_font_family_css("astra-settings[font-family-"+i+"]",n),astra_generate_font_weight_css("astra-settings[font-family-"+i+"]","astra-settings[font-weight-"+i+"]","font-weight",n),astra_font_extras_css("font-extras-"+i,n),m=o=r=void 0;var r=e;for(r=1;r<=astTypography.component_limit;r++){var o="widget-"+r,m='.header-widget-area[data-section="sidebar-widgets-header-widget-'+r+'"]';astra_generate_outside_font_family_css("astra-settings[header-"+o+"-font-family]",m+" .widget-title"),astra_generate_font_weight_css("astra-settings[header-"+o+"-font-family]","astra-settings[header-"+o+"-font-weight]","font-weight",m+" .widget-title"),astra_font_extras_css("header-"+o+"-font-extras",m+" .widget-title"),astra_generate_outside_font_family_css("astra-settings[header-"+o+"-content-font-family]",m+" .header-widget-area-inner"),astra_generate_font_weight_css("astra-settings[header-"+o+"-content-font-family]","astra-settings[header-"+o+"-content-font-weight]","font-weight",m+" .header-widget-area-inner"),astra_font_extras_css("header-"+o+"-content-font-extras",m+" .header-widget-area-inner")}_=g=f=void 0;var f=e;for(f=1;f<=astTypography.component_limit;f++){var g="widget-"+f,_='.footer-widget-area[data-section="sidebar-widgets-footer-widget-'+f+'"]';astra_generate_outside_font_family_css("astra-settings[footer-"+g+"-font-family]",_+" .widget-title"),astra_generate_font_weight_css("astra-settings[footer-"+g+"-font-family]","astra-settings[footer-"+g+"-font-weight]","font-weight",_+" .widget-title"),astra_font_extras_css("footer-"+g+"-font-extras",_+" .widget-title"),astra_generate_outside_font_family_css("astra-settings[footer-"+g+"-content-font-family]",_+" .footer-widget-area-inner"),astra_generate_font_weight_css("astra-settings[footer-"+g+"-content-font-family]","astra-settings[footer-"+g+"-content-font-weight]","font-weight",_+" .footer-widget-area-inner"),astra_font_extras_css("footer-"+g+"-content-font-extras",_+" .footer-widget-area-inner")}}for(e=1;e<=astTypography.component_limit;e++){var a="html"+e,l="section-fb-html-"+e,t=".site-footer-section .ast-footer-html-"+e+" .ast-builder-html-element";astra_generate_outside_font_family_css("astra-settings[font-family-"+l+"]",t),astra_generate_font_weight_css("astra-settings[font-family-"+l+"]","astra-settings[font-weight-"+l+"]","font-weight",t),astra_font_extras_css("font-extras-"+l,t)}var u="section-hb-language-switcher",h=".ast-lswitcher-item-header",h=(astra_responsive_font_size("astra-settings[font-size-"+u+"]",h),astra_generate_outside_font_family_css("astra-settings[font-family-"+u+"]",h),astra_generate_font_weight_css("astra-settings[font-family-"+u+"]","astra-settings[font-weight-"+u+"]","font-weight",h),astra_font_extras_css("font-extras-"+u,".ast-lswitcher-item-header"),"section-fb-language-switcher"),u=".ast-lswitcher-item-footer",t=(astra_responsive_font_size("astra-settings[font-size-"+h+"]",u),astra_generate_outside_font_family_css("astra-settings[font-family-"+h+"]",u),astra_generate_font_weight_css("astra-settings[font-family-"+h+"]","astra-settings[font-weight-"+h+"]","font-weight",u),astra_font_extras_css("font-extras-"+h,".ast-lswitcher-item-footer"),".ast-footer-copyright"),l="section-footer-copyright",t=(astra_responsive_font_size("astra-settings[font-size-"+l+"]",t),astra_generate_outside_font_family_css("astra-settings[font-family-"+l+"]",t),astra_generate_font_weight_css("astra-settings[font-family-"+l+"]","astra-settings[font-weight-"+l+"]","font-weight",t),astra_font_extras_css("font-extras-"+l,".ast-footer-copyright"),".ast-header-account-wrap"),l="section-header-account",t=(astra_generate_outside_font_family_css("astra-settings[font-family-"+l+"]",t+" .ast-header-account-text"),astra_generate_font_weight_css("astra-settings[font-family-"+l+"]","astra-settings[font-weight-"+l+"]","font-weight",t+" .ast-header-account-text"),astra_font_extras_css("font-extras-"+l,t+" .ast-header-account-text"),astra_generate_outside_font_family_css("astra-settings["+l+"-menu-font-family]",t+" .main-header-menu.ast-account-nav-menu .menu-link"),astra_generate_font_weight_css("astra-settings["+l+"-menu-font-family]","astra-settings["+l+"-menu-font-weight]","font-weight",t+" .main-header-menu.ast-account-nav-menu .menu-link"),astra_font_extras_css(l+"-menu-font-extras",t+" .main-header-menu.ast-account-nav-menu .menu-link"),astra_responsive_font_size("astra-settings["+l+"-menu-font-size]",t+" .main-header-menu.ast-account-nav-menu .menu-link"),astra_responsive_font_size("astra-settings["+l+"-popup-font-size]",t+" .ast-hb-account-login-form input[type=text], "+t+" .ast-hb-account-login-form input[type=password], "+t+" .ast-hb-account-login-form label,"+t+" .ast-hb-account-login-form-footer .ast-header-account-footer-link"),astra_responsive_font_size("astra-settings["+l+"-popup-button-font-size]",t+' .ast-hb-account-login-form input[type="submit"]'),"#astra-footer-menu");astra_generate_outside_font_family_css("astra-settings[footer-menu-font-family]",t+" .menu-item > a"),astra_generate_font_weight_css("astra-settings[footer-menu-font-family]","astra-settings[footer-menu-font-weight]","font-weight",t+" .menu-item > a"),astra_font_extras_css("footer-menu-font-extras",t+" .menu-item > a.menu-link"),astra_generate_outside_font_family_css("astra-settings[mobile-header-label-font-family]",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu'),astra_generate_font_weight_css("astra-settings[mobile-header-label-font-family]","astra-settings[mobile-header-label-font-weight]","font-weight",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu'),astra_font_extras_css("mobile-header-label-font-extras",'[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu')}(jQuery); assets/js/unminified/customizer-preview.js 0000666 00000054077 15165520225 0015056 0 ustar 00 /** * This file adds some LIVE to the Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. * * @package Astra Addon * @since 1.0.0 */ ( function( $ ) { astra_responsive_font_size( 'astra-settings[font-size-primary-menu]', '.main-navigation, .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items' ); astra_responsive_font_size( 'astra-settings[font-size-post-meta]', '.entry-meta, .read-more' ); astra_responsive_font_size( 'astra-settings[font-size-post-pagination]', '.ast-pagination .page-numbers, .ast-pagination .page-navigation' ); astra_responsive_font_size( 'astra-settings[font-size-widget-title]', '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' ); astra_responsive_font_size( 'astra-settings[font-size-widget-content]', '.secondary .widget > *:not(.widget-title)' ); astra_responsive_font_size( 'astra-settings[font-size-footer-content]', '.ast-small-footer' ); astra_generate_outside_font_family_css( 'astra-settings[font-family-archive-summary-title]', '.ast-archive-description .ast-archive-title' ); astra_generate_font_weight_css( 'astra-settings[font-family-archive-summary-title]', 'astra-settings[font-weight-archive-summary-title]', 'font-weight', '.ast-archive-description .ast-archive-title' ); astra_font_extras_css( 'font-extras-archive-summary-title', '.ast-archive-description .ast-archive-title' ); astra_generate_outside_font_family_css( 'astra-settings[font-family-page-title]', '.blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a' ); astra_generate_font_weight_css( 'astra-settings[font-family-page-title]', 'astra-settings[font-weight-page-title]', 'font-weight', '.blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a' ); astra_css( 'astra-settings[font-weight-page-title]', 'font-weight', '.blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a' ); astra_font_extras_css( 'font-extras-page-title', '.blog .entry-title, .blog .entry-title a, .archive .entry-title, .archive .entry-title a, .search .entry-title, .search .entry-title a' ); astra_generate_outside_font_family_css( 'astra-settings[font-family-entry-title]', '.ast-single-post .entry-title, .page-title' ); astra_generate_font_weight_css( 'astra-settings[font-family-entry-title]', 'astra-settings[font-weight-entry-title]', 'font-weight', '.ast-single-post .entry-title, .page-title' ); astra_font_extras_css( 'font-extras-entry-title', '.ast-single-post .entry-title, .page-title' ); astra_generate_outside_font_family_css( 'astra-settings[font-family-post-meta]', '.entry-meta, .read-more' ); astra_generate_font_weight_css( 'astra-settings[font-family-post-meta]', 'astra-settings[font-weight-post-meta]', 'font-weight', '.entry-meta, .read-more' ); astra_font_extras_css( 'font-extras-post-meta', '.entry-meta, .read-more' ); astra_css( 'astra-settings[text-transform-post-pagination]', 'text-transform', '.ast-pagination .page-numbers, .ast-pagination .page-navigation' ); astra_css( 'astra-settings[line-height-footer-content]', 'line-height', '.ast-small-footer' ); astra_css( 'astra-settings[text-transform-footer-content]', 'text-transform', '.ast-small-footer' ); astra_font_extras_css( 'font-extras-site-title', '.site-title a' ); astra_font_extras_css( 'font-extras-site-tagline', '.site-header .site-description' ); astra_font_extras_css( 'font-extras-widget-title', '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' ); astra_responsive_font_size( 'astra-settings[font-size-button]', 'button, .ast-button, input#submit, input[type="button"], input[type="submit"], input[type="reset"]' ); astra_css( 'astra-settings[outside-menu-line-height]', 'line-height', '.ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *' ); var selector = '.main-navigation'; if ( '' != ast_enabled_addons['header-sections'] ) { selector += ', .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items'; } astra_generate_outside_font_family_css( 'astra-settings[font-family-primary-menu]', selector ); var selector = '.main-navigation'; if ( '' != ast_enabled_addons['header-sections'] ) { selector += ', .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items'; } astra_css( 'astra-settings[font-weight-primary-menu]', 'font-weight', selector ); var selector = '.main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type'; astra_generate_outside_font_family_css( 'astra-settings[font-family-primary-dropdown-menu]', selector ); astra_css( 'astra-settings[text-transform-primary-menu]', 'text-transform', '.main-header-bar .main-header-bar-navigation' ); astra_responsive_font_size( 'astra-settings[font-size-primary-menu]', '.main-navigation, .ast-header-sections-navigation, .ast-above-header-menu-items, .ast-below-header-menu-items' ); astra_css( 'astra-settings[line-height-primary-menu]', 'line-height', '.main-header-bar' ); astra_css( 'astra-settings[font-weight-primary-dropdown-menu]', 'font-weight', '.main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type' ); astra_css( 'astra-settings[text-transform-primary-dropdown-menu]', 'text-transform', '.main-header-bar .main-header-bar-navigation .sub-menu, .ast-header-sections-navigation .sub-menu, .ast-above-header-menu-items .sub-menu, .ast-below-header-menu-items .sub-menu' ); astra_responsive_font_size( 'astra-settings[font-size-primary-dropdown-menu]', '.main-header-menu > .menu-item > .sub-menu:first-of-type, .ast-header-sections-navigation li > .sub-menu:first-of-type, .ast-above-header-menu-items .menu-item > .sub-menu:first-of-type, .ast-below-header-menu-items li > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type' ); astra_css( 'astra-settings[line-height-primary-dropdown-menu]', 'line-height', '.main-header-bar .main-header-bar-navigation .sub-menu, .ast-header-sections-navigation .sub-menu, .ast-above-header-menu-items .sub-menu, .ast-below-header-menu-items .sub-menu' ); // Footer Typo var selector = '.main-header-menu > .menu-item > .sub-menu:first-of-type, .main-header-menu > .menu-item > .astra-full-megamenu-wrapper:first-of-type'; astra_generate_outside_font_family_css( 'astra-settings[font-family-footer-content]', '.ast-small-footer' ); astra_css( 'astra-settings[font-weight-footer-content]', 'font-weight', '.ast-small-footer' ); astra_css( 'astra-settings[text-transform-footer-content]', 'text-transform', '.ast-small-footer' ); astra_responsive_font_size( 'astra-settings[font-size-footer-content]', '.ast-small-footer' ); astra_css( 'astra-settings[line-height-footer-content]', 'line-height', '.ast-small-footer' ); // Sidebar Title Typo astra_generate_outside_font_family_css( 'astra-settings[font-family-widget-title]', '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' ); astra_generate_font_weight_css( 'astra-settings[font-family-widget-title]', 'astra-settings[font-weight-widget-title]', 'font-weight', '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' ); astra_responsive_font_size( 'astra-settings[font-size-widget-title]', '.secondary .widget-title, .woocommerce-page #secondary .widget .widget-title' ); // Sidebar Content Typo astra_generate_outside_font_family_css( 'astra-settings[font-family-widget-content]', '.secondary .widget > *:not(.widget-title)' ); astra_generate_font_weight_css( 'astra-settings[font-family-widget-content]', 'astra-settings[font-weight-widget-content]', 'font-weight', '.secondary .widget > *:not(.widget-title)' ); astra_responsive_font_size( 'astra-settings[font-size-widget-content]', '.secondary .widget > *:not(.widget-title)' ); astra_font_extras_css( 'font-extras-widget-content', '.secondary .widget > *:not(.widget-title)' ); // Primary outside menu item Typo astra_responsive_font_size( 'astra-settings[outside-menu-font-size]', '.ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *' ); astra_css( 'astra-settings[outside-menu-line-height]', 'line-height', '.ast-masthead-custom-menu-items, .ast-masthead-custom-menu-items *' ); /** * Header - Menu - Typography. */ for ( var index = 1; index <= astTypography.component_limit; index++ ) { var prefix = 'menu' + index; var selector = '.ast-hfb-header .ast-builder-menu-' + index + '.ast-builder-menu .main-header-menu'; if ( astTypography.astra_not_updated ) { selector = '.astra-hfb-header .ast-builder-menu-' + index + '.ast-builder-menu .main-header-menu'; } // Sub-Menu Typography. astra_generate_outside_font_family_css( 'astra-settings[header-font-family-' + prefix + '-sub-menu]', selector + ' .sub-menu .menu-item .menu-link' ); astra_generate_font_weight_css( 'astra-settings[header-font-family-' + prefix + '-sub-menu]', 'astra-settings[header-font-weight-' + prefix + '-sub-menu]', 'font-weight', selector + ' .sub-menu .menu-item .menu-link' ); astra_responsive_font_size( 'astra-settings[header-font-size-' + prefix + '-sub-menu]', selector + ' .sub-menu .menu-item .menu-link' ); font_extra_sub_menu( selector, prefix ); if ( 3 > index ) { // Mega Menu Typography. astra_generate_outside_font_family_css( 'astra-settings[header-' + prefix + '-megamenu-heading-font-family]', selector + ' .menu-item.menu-item-heading > .menu-link' ); astra_generate_font_weight_css( 'astra-settings[header-' + prefix + '-megamenu-heading-font-family]', 'astra-settings[header-' + prefix + '-megamenu-heading-font-weight]', 'font-weight', selector + ' .menu-item.menu-item-heading > .menu-link' ); astra_responsive_font_size( 'astra-settings[header-' + prefix + '-megamenu-heading-font-size]', selector + ' .menu-item.menu-item-heading > .menu-link' ); font_extra_mega_menu( selector, prefix ); } } function font_extra_sub_menu( selector, prefix ) { astra_font_extras_css( 'header-font-extras-' + prefix + '-sub-menu', selector + ' .sub-menu .menu-item .menu-link' ); } function font_extra_mega_menu( selector, prefix ) { astra_font_extras_css( 'header-' + prefix + '-megamenu-heading-font-extras', selector + ' .menu-item.menu-item-heading > .menu-link' ); } /** * Mobile menu - Typography */ var selector = '.ast-hfb-header .ast-builder-menu-mobile .main-header-menu'; if ( astTypography.astra_not_updated ) { selector = '.astra-hfb-header .ast-builder-menu-mobile .main-header-menu'; } // Sub-Menu Typography. astra_generate_outside_font_family_css( 'astra-settings[header-font-family-mobile-menu-sub-menu]', selector + ' .sub-menu .menu-item .menu-link' ); astra_generate_font_weight_css( 'astra-settings[header-font-family-mobile-menu-sub-menu]', 'astra-settings[header-font-weight-mobile-menu-sub-menu]', 'font-weight', selector + ' .sub-menu .menu-item .menu-link' ); astra_responsive_font_size( 'astra-settings[header-font-size-mobile-menu-sub-menu]', selector + '.ast-nav-menu .sub-menu .menu-item .menu-link' ); astra_font_extras_css( 'font-extras-mobile-menu-sub-menu', '.ast-hfb-header .ast-builder-menu-mobile .main-header-menu .sub-menu .menu-item .menu-link' ); function prepare_html_preview( index ) { var prefix = 'html' + index; var section = 'section-hb-html-' + index; var selector = '.site-header-section .ast-builder-layout-element.ast-header-html-' + index + ' .ast-builder-html-element' astra_generate_outside_font_family_css( 'astra-settings[font-family-' + section + ']', selector ); astra_generate_font_weight_css( 'astra-settings[font-family-' + section + ']', 'astra-settings[font-weight-' + section + ']', 'font-weight', selector ); astra_font_extras_css( 'font-extras-' + section, selector ); } function prepare_social_icon_preview(index) { // Header. var section = 'section-hb-social-icons-' + index; var selector = '.ast-builder-layout-element .ast-header-social-' + index + '-wrap'; astra_generate_outside_font_family_css( 'astra-settings[font-family-' + section + ']', selector ); astra_generate_font_weight_css( 'astra-settings[font-family-' + section + ']', 'astra-settings[font-weight-' + section + ']', 'font-weight', selector ); astra_font_extras_css( 'font-extras-' + section, selector ); // Footer. var section = 'section-fb-social-icons-' + index; var selector = '.ast-builder-layout-element .ast-footer-social-' + index + '-wrap'; astra_generate_outside_font_family_css( 'astra-settings[font-family-' + section + ']', selector ); astra_generate_font_weight_css( 'astra-settings[font-family-' + section + ']', 'astra-settings[font-weight-' + section + ']', 'font-weight', selector ); astra_font_extras_css( 'font-extras-' + section, selector ); } for ( var index = 1; index <= astTypography.component_limit; index++ ) { prepare_html_preview(index); prepare_social_icon_preview(index); prepare_header_widget_preview(index); prepare_footer_widget_preview(index); } function prepare_header_widget_preview(index) { /** * Header - Widget - Typography */ for ( var index = 1; index <= astTypography.component_limit; index++ ) { var prefix = 'widget-' + index; var selector = '.header-widget-area[data-section="sidebar-widgets-header-widget-' + index + '"]'; /** * Widget Title */ astra_generate_outside_font_family_css( 'astra-settings[header-' + prefix + '-font-family]', selector + ' .widget-title' ); astra_generate_font_weight_css( 'astra-settings[header-' + prefix + '-font-family]', 'astra-settings[header-' + prefix + '-font-weight]', 'font-weight', selector + ' .widget-title' ); astra_font_extras_css( 'header-' + prefix + '-font-extras', selector + ' .widget-title' ); /** * Widget Content */ astra_generate_outside_font_family_css( 'astra-settings[header-' + prefix + '-content-font-family]', selector + ' .header-widget-area-inner' ); astra_generate_font_weight_css( 'astra-settings[header-' + prefix + '-content-font-family]', 'astra-settings[header-' + prefix + '-content-font-weight]', 'font-weight', selector + ' .header-widget-area-inner' ); astra_font_extras_css( 'header-' + prefix + '-content-font-extras', selector + ' .header-widget-area-inner' ); } } function prepare_footer_widget_preview(index) { /** * Footer - Widget - Typography */ for ( var index = 1; index <= astTypography.component_limit; index++ ) { var prefix = 'widget-' + index; var selector = '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' + index + '"]'; /** * Widget Title */ astra_generate_outside_font_family_css( 'astra-settings[footer-' + prefix + '-font-family]', selector + ' .widget-title' ); astra_generate_font_weight_css( 'astra-settings[footer-' + prefix + '-font-family]', 'astra-settings[footer-' + prefix + '-font-weight]', 'font-weight', selector + ' .widget-title' ); astra_font_extras_css( 'footer-' + prefix + '-font-extras', selector + ' .widget-title' ); /** * Widget Content */ astra_generate_outside_font_family_css( 'astra-settings[footer-' + prefix + '-content-font-family]', selector + ' .footer-widget-area-inner' ); astra_generate_font_weight_css( 'astra-settings[footer-' + prefix + '-content-font-family]', 'astra-settings[footer-' + prefix + '-content-font-weight]', 'font-weight', selector + ' .footer-widget-area-inner' ); astra_font_extras_css( 'footer-' + prefix + '-content-font-extras', selector + ' .footer-widget-area-inner' ); } } /** * Footer - HTML - Typography */ for ( var index = 1; index <= astTypography.component_limit; index++ ) { var prefix = 'html' + index; var section = 'section-fb-html-' + index; var selector = '.site-footer-section .ast-footer-html-' + index + ' .ast-builder-html-element'; astra_generate_outside_font_family_css( 'astra-settings[font-family-' + section + ']', selector ); astra_generate_font_weight_css( 'astra-settings[font-family-' + section + ']', 'astra-settings[font-weight-' + section + ']', 'font-weight', selector ); font_extra_footer_html( selector, section ); } function font_extra_footer_html( selector, section ) { astra_font_extras_css( 'font-extras-' + section, selector ); } /** * Header - Language switcher - Typography */ var lswitcher_section = 'section-hb-language-switcher'; var lswitcher_selector = '.ast-lswitcher-item-header'; astra_responsive_font_size( 'astra-settings[font-size-' + lswitcher_section + ']', lswitcher_selector ); astra_generate_outside_font_family_css( 'astra-settings[font-family-' + lswitcher_section + ']', lswitcher_selector ); astra_generate_font_weight_css( 'astra-settings[font-family-' + lswitcher_section + ']', 'astra-settings[font-weight-' + lswitcher_section + ']', 'font-weight', lswitcher_selector ); astra_font_extras_css( 'font-extras-' + lswitcher_section, '.ast-lswitcher-item-header' ); /** * Footer - Language switcher - Typography */ var lswitcher_fb_section = 'section-fb-language-switcher'; var lswitcher_fb_selector = '.ast-lswitcher-item-footer'; astra_responsive_font_size( 'astra-settings[font-size-' + lswitcher_fb_section + ']', lswitcher_fb_selector ); astra_generate_outside_font_family_css( 'astra-settings[font-family-' + lswitcher_fb_section + ']', lswitcher_fb_selector ); astra_generate_font_weight_css( 'astra-settings[font-family-' + lswitcher_fb_section + ']', 'astra-settings[font-weight-' + lswitcher_fb_section + ']', 'font-weight', lswitcher_fb_selector ); astra_font_extras_css( 'font-extras-' + lswitcher_fb_section, '.ast-lswitcher-item-footer' ); /** * Footer - Copyright - Typography */ var selector = '.ast-footer-copyright'; var section = 'section-footer-copyright'; astra_responsive_font_size( 'astra-settings[font-size-' + section + ']', selector ); astra_generate_outside_font_family_css( 'astra-settings[font-family-' + section + ']', selector ); astra_generate_font_weight_css( 'astra-settings[font-family-' + section + ']', 'astra-settings[font-weight-' + section + ']', 'font-weight', selector ); astra_font_extras_css( 'font-extras-' + section, '.ast-footer-copyright' ); /** * Header - Account - Typography */ var selector = '.ast-header-account-wrap'; var section = 'section-header-account'; astra_generate_outside_font_family_css( 'astra-settings[font-family-' + section + ']', selector + ' .ast-header-account-text' ); astra_generate_font_weight_css( 'astra-settings[font-family-' + section + ']', 'astra-settings[font-weight-' + section + ']', 'font-weight', selector + ' .ast-header-account-text' ); astra_font_extras_css( 'font-extras-' + section, selector + ' .ast-header-account-text' ); // Menu Typography. astra_generate_outside_font_family_css( 'astra-settings[' + section + '-menu-font-family]', selector + ' .main-header-menu.ast-account-nav-menu .menu-link' ); astra_generate_font_weight_css( 'astra-settings[' + section + '-menu-font-family]', 'astra-settings[' + section + '-menu-font-weight]', 'font-weight', selector + ' .main-header-menu.ast-account-nav-menu .menu-link' ); astra_font_extras_css( section + '-menu-font-extras', selector + ' .main-header-menu.ast-account-nav-menu .menu-link' ); astra_responsive_font_size( 'astra-settings[' + section + '-menu-font-size]', selector + ' .main-header-menu.ast-account-nav-menu .menu-link' ); // Login Popup Typography. astra_responsive_font_size( 'astra-settings[' + section + '-popup-font-size]', selector + ' .ast-hb-account-login-form input[type=text], ' + selector + ' .ast-hb-account-login-form input[type=password], ' + selector + ' .ast-hb-account-login-form label,' + selector + ' .ast-hb-account-login-form-footer .ast-header-account-footer-link' ); astra_responsive_font_size( 'astra-settings[' + section + '-popup-button-font-size]', selector + ' .ast-hb-account-login-form input[type="submit"]' ); /** * Footer - Menu - Typography. */ var selector = '#astra-footer-menu'; astra_generate_outside_font_family_css( 'astra-settings[footer-menu-font-family]', selector + ' .menu-item > a' ); astra_generate_font_weight_css( 'astra-settings[footer-menu-font-family]', 'astra-settings[footer-menu-font-weight]', 'font-weight', selector + ' .menu-item > a' ); astra_font_extras_css( 'footer-menu-font-extras', selector + ' .menu-item > a.menu-link' ); /** * Header - Mobile Trigger - Typography. */ astra_generate_outside_font_family_css( 'astra-settings[mobile-header-label-font-family]', '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu' ); astra_generate_font_weight_css( 'astra-settings[mobile-header-label-font-family]', 'astra-settings[mobile-header-label-font-weight]', 'font-weight', '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu' ); astra_font_extras_css( 'mobile-header-label-font-extras', '[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-wrap .mobile-menu' ); } )( jQuery );
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings