File manager - Edit - /home/aresglob/public_html/wp/wp-includes/images/smilies/footer.tar
Back
below-footer/class-astra-below-footer.php 0000644 00000002431 15105146410 0014475 0 ustar 00 <?php /** * Below Footer component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_BELOW_FOOTER_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/below-footer' ); define( 'ASTRA_BUILDER_FOOTER_BELOW_FOOTER_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/below-footer' ); if ( ! class_exists( 'Astra_Below_Footer' ) ) { /** * Below Footer Initial Setup * * @since 3.0.0 */ class Astra_Below_Footer { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_BELOW_FOOTER_DIR . '/class-astra-below-footer-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_BELOW_FOOTER_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Below_Footer(); } below-footer/dynamic-css/dynamic.css.php 0000644 00000014154 15105146410 0014310 0 ustar 00 <?php /** * Below Footer control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Below Footer CSS */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_below_footer_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for below Footer. * * @since 3.0.0 */ function astra_fb_below_footer_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { if ( ! ( Astra_Builder_Helper::is_footer_row_empty( 'below' ) || is_customize_preview() ) ) { return $dynamic_css; } $_section = 'section-below-footer-builder'; $selector = '.site-below-footer-wrap[data-section="section-below-footer-builder"]'; $footer_bg = astra_get_option( 'hbb-footer-bg-obj-responsive' ); $footer_height = astra_get_option( 'hbb-footer-height' ); $footer_top_border_size = astra_get_option( 'hbb-footer-separator' ); $footer_top_border_color = astra_get_option( 'hbb-footer-top-border-color' ); $footer_width = astra_get_option( 'hbb-footer-layout-width' ); $content_width = astra_get_option( 'site-content-width' ); $inner_spacing = astra_get_option( 'hbb-inner-spacing' ); $layout = astra_get_option( 'hbb-footer-layout' ); $desk_layout = isset( $layout['desktop'] ) ? $layout['desktop'] : 'full'; $tab_layout = isset( $layout['tablet'] ) ? $layout['tablet'] : 'full'; $mob_layout = isset( $layout['mobile'] ) ? $layout['mobile'] : 'full'; $inner_spacing_desktop = isset( $inner_spacing['desktop'] ) ? $inner_spacing['desktop'] : ''; $inner_spacing_tablet = isset( $inner_spacing['tablet'] ) ? $inner_spacing['tablet'] : ''; $inner_spacing_mobile = isset( $inner_spacing['mobile'] ) ? $inner_spacing['mobile'] : ''; $css_output_desktop = array( '.site-below-footer-wrap' => array( 'padding-top' => '20px', 'padding-bottom' => '20px', ), $selector => astra_get_responsive_background_obj( $footer_bg, 'desktop' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_desktop, 'px' ), ), $selector . ' .ast-builder-grid-row, ' . $selector . ' .site-footer-section' => array( 'align-items' => astra_get_option( 'hbb-footer-vertical-alignment' ), ), $selector . '.ast-footer-row-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), '.ast-builder-grid-row-' . $desk_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $desk_layout ], ), ); $css_output_desktop[ $selector ]['min-height'] = astra_get_css_value( $footer_height, 'px' ); if ( isset( $footer_top_border_size ) && 1 <= $footer_top_border_size ) { $css_output_desktop[ $selector ]['border-style'] = 'solid'; $css_output_desktop[ $selector ]['border-width'] = '0px'; $css_output_desktop[ $selector ]['border-top-width'] = astra_get_css_value( $footer_top_border_size, 'px' ); $css_output_desktop[ $selector ]['border-top-color'] = $footer_top_border_color; } $css_output_tablet = array( $selector => astra_get_responsive_background_obj( $footer_bg, 'tablet' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_tablet, 'px' ), 'grid-row-gap' => astra_get_css_value( $inner_spacing_tablet, 'px' ), ), $selector . '.ast-footer-row-tablet-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), $selector . '.ast-footer-row-tablet-stack .site-footer-section' => array( 'display' => 'block', 'margin-bottom' => '10px', ), '.ast-builder-grid-row-container.ast-builder-grid-row-tablet-' . $tab_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $tab_layout ], ), ); $css_output_mobile = array( $selector => astra_get_responsive_background_obj( $footer_bg, 'mobile' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_mobile, 'px' ), 'grid-row-gap' => astra_get_css_value( $inner_spacing_mobile, 'px' ), ), $selector . '.ast-footer-row-mobile-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), $selector . '.ast-footer-row-mobile-stack .site-footer-section' => array( 'display' => 'block', 'margin-bottom' => '10px', ), '.ast-builder-grid-row-container.ast-builder-grid-row-mobile-' . $mob_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $mob_layout ], ), ); if ( isset( $footer_width ) && 'content' === $footer_width ) { $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['max-width'] = astra_get_css_value( $content_width, 'px' ); $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['min-height'] = astra_get_css_value( $footer_height, 'px' ); $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['margin-left'] = 'auto'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['margin-right'] = 'auto'; } else { $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['max-width'] = '100%'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['padding-left'] = '35px'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['padding-right'] = '35px'; } /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; $dynamic_css .= Astra_Extended_Base_Dynamic_CSS::prepare_advanced_margin_padding_css( $_section, $selector ); $dynamic_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector, 'grid' ); return $dynamic_css; } below-footer/assets/js/unminified/customizer-preview.js 0000644 00000010251 15105146410 0017432 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 * @since 3.0.0 */ ( function( $ ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; var section = 'section-below-footer-builder'; var selector = '.site-below-footer-wrap[data-section="section-below-footer-builder"]'; // Footer Vertical Alignment. astra_css( 'astra-settings[hbb-footer-vertical-alignment]', 'align-items', selector + ' .ast-builder-grid-row, ' + selector + ' .site-footer-section' ); // Inner Space. wp.customize( 'astra-settings[hbb-inner-spacing]', function( value ) { value.bind( function( spacing ) { var dynamicStyle = ''; if ( spacing.desktop != '' ) { dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.desktop + 'px;'; dynamicStyle += '} '; } if ( spacing.tablet != '' ) { dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.tablet + 'px;'; dynamicStyle += 'grid-row-gap: ' + spacing.tablet + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; } if ( spacing.mobile != '' ) { dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.mobile + 'px;'; dynamicStyle += 'grid-row-gap: ' + spacing.mobile + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( 'hbb-inner-spacing-toggle-button', dynamicStyle ); } ); } ); // Border Top width. wp.customize( 'astra-settings[hbb-footer-separator]', function( setting ) { setting.bind( function( separator ) { var dynamicStyle = ''; if ( '' !== separator ) { dynamicStyle = selector + ' {'; dynamicStyle += 'border-top-width: ' + separator + 'px;'; dynamicStyle += 'border-top-style: solid'; dynamicStyle += '} '; } astra_add_dynamic_css( 'hbb-footer-separator', dynamicStyle ); } ); } ); // Border Color. wp.customize( 'astra-settings[hbb-footer-top-border-color]', function( setting ) { setting.bind( function( color ) { var dynamicStyle = ''; if ( '' !== color ) { dynamicStyle = selector + ' {'; dynamicStyle += 'border-top-color: ' + color + ';'; dynamicStyle += 'border-top-style: solid'; dynamicStyle += '} '; } astra_add_dynamic_css( 'hbb-footer-top-border-color', dynamicStyle ); } ); } ); // Primary Header - Layout. wp.customize( 'astra-settings[hbb-footer-layout-width]', function( setting ) { setting.bind( function( layout ) { var dynamicStyle = ''; if ( 'content' == layout ) { dynamicStyle = selector + ' .ast-builder-grid-row {'; dynamicStyle += 'max-width: ' + AstraBuilderPrimaryFooterData.footer_content_width + 'px;'; dynamicStyle += 'margin-left: auto;'; dynamicStyle += 'margin-right: auto;'; dynamicStyle += '} '; } if ( 'full' == layout ) { dynamicStyle = selector + ' .ast-builder-grid-row {'; dynamicStyle += 'max-width: 100%;'; dynamicStyle += 'padding-right: 35px; padding-left: 35px;'; dynamicStyle += '} '; } astra_add_dynamic_css( 'hbb-footer-layout-width', dynamicStyle ); } ); } ); // Responsive BG styles > Below Footer Row. astra_apply_responsive_background_css( 'astra-settings[hbb-footer-bg-obj-responsive]', selector, 'desktop' ); astra_apply_responsive_background_css( 'astra-settings[hbb-footer-bg-obj-responsive]', selector, 'tablet' ); astra_apply_responsive_background_css( 'astra-settings[hbb-footer-bg-obj-responsive]', selector, 'mobile' ); // Advanced CSS Generation. astra_builder_advanced_css( section, selector ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector, 'grid' ); } )( jQuery ); below-footer/assets/js/minified/customizer-preview.min.js 0000644 00000004133 15105146410 0017653 0 ustar 00 (()=>{var o=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544,t="section-below-footer-builder",e='.site-below-footer-wrap[data-section="section-below-footer-builder"]';astra_css("astra-settings[hbb-footer-vertical-alignment]","align-items",e+" .ast-builder-grid-row, "+e+" .site-footer-section"),wp.customize("astra-settings[hbb-inner-spacing]",function(t){t.bind(function(t){var r="";""!=t.desktop&&(r=(r+=e+" .ast-builder-grid-row {")+"grid-column-gap: "+t.desktop+"px;} "),""!=t.tablet&&(r=(r=(r+="@media (max-width: "+o+"px) {")+e+" .ast-builder-grid-row {grid-column-gap: "+t.tablet+"px;")+"grid-row-gap: "+t.tablet+"px;} } "),""!=t.mobile&&(r=(r=(r+="@media (max-width: "+a+"px) {")+e+" .ast-builder-grid-row {grid-column-gap: "+t.mobile+"px;")+"grid-row-gap: "+t.mobile+"px;} } "),astra_add_dynamic_css("hbb-inner-spacing-toggle-button",r)})}),wp.customize("astra-settings[hbb-footer-separator]",function(t){t.bind(function(t){var r="";""!==t&&(r=(r=e+" {")+"border-top-width: "+t+"px;border-top-style: solid} "),astra_add_dynamic_css("hbb-footer-separator",r)})}),wp.customize("astra-settings[hbb-footer-top-border-color]",function(t){t.bind(function(t){var r="";""!==t&&(r=(r=e+" {")+"border-top-color: "+t+";border-top-style: solid} "),astra_add_dynamic_css("hbb-footer-top-border-color",r)})}),wp.customize("astra-settings[hbb-footer-layout-width]",function(t){t.bind(function(t){var r="";"content"==t&&(r=(r=e+" .ast-builder-grid-row {")+"max-width: "+AstraBuilderPrimaryFooterData.footer_content_width+"px;margin-left: auto;margin-right: auto;} "),"full"==t&&(r=e+" .ast-builder-grid-row {",r+="max-width: 100%;padding-right: 35px; padding-left: 35px;} "),astra_add_dynamic_css("hbb-footer-layout-width",r)})}),astra_apply_responsive_background_css("astra-settings[hbb-footer-bg-obj-responsive]",e,"desktop"),astra_apply_responsive_background_css("astra-settings[hbb-footer-bg-obj-responsive]",e,"tablet"),astra_apply_responsive_background_css("astra-settings[hbb-footer-bg-obj-responsive]",e,"mobile"),astra_builder_advanced_css(t,e),astra_builder_visibility_css(t,e,"grid")})(jQuery); below-footer/class-astra-below-footer-component-loader.php 0000644 00000002244 15105146410 0017743 0 ustar 00 <?php /** * Below Footer Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Below Footer Initialization * * @since 3.0.0 */ class Astra_Below_Footer_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-below-footer-customizer-preview-js', ASTRA_BUILDER_FOOTER_BELOW_FOOTER_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Below_Footer_Component_Loader(); widget/class-astra-footer-widget-component.php 0000644 00000002266 15105146410 0015535 0 ustar 00 <?php /** * WIDGET component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_WIDGET_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/widget' ); define( 'ASTRA_BUILDER_FOOTER_WIDGET_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/widget' ); /** * Heading Initial Setup * * @since 3.0.0 */ class Astra_Footer_Widget_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_WIDGET_DIR . '/class-astra-footer-widget-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_WIDGET_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Widget_Component(); widget/dynamic-css/dynamic.css.php 0000644 00000006072 15105146410 0013167 0 ustar 00 <?php /** * WIdget control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Heading Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_widget_dynamic_css' ); /** * Whether to fix the footer right-margin space not working case or not. * * As this affects the frontend, added this backward compatibility for existing users. * * @since 3.6.7 * @return bool false if it is an existing user, true if not. */ function astra_support_footer_widget_right_margin() { $astra_settings = astra_get_options(); return apply_filters( 'astra_apply_right_margin_footer_widget_css', isset( $astra_settings['support-footer-widget-right-margin'] ) ? false : true ); } /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_fb_widget_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_widgets; $index++ ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'widget-' . $index, 'footer' ) ) { continue; } $selector = '.footer-widget-area[data-section="sidebar-widgets-footer-widget-' . $index . '"]'; $alignment = astra_get_option( 'footer-widget-alignment-' . $index ); $desktop_alignment = isset( $alignment['desktop'] ) ? $alignment['desktop'] : ''; $tablet_alignment = isset( $alignment['tablet'] ) ? $alignment['tablet'] : ''; $mobile_alignment = isset( $alignment['mobile'] ) ? $alignment['mobile'] : ''; /** * Widget CSS. */ if ( Astra_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 = array( $footer_widget_selector => array( 'text-align' => $desktop_alignment, ), ); $css_output_tablet = array( $footer_widget_selector => array( 'text-align' => $tablet_alignment, ), ); $css_output_mobile = array( $footer_widget_selector => array( 'text-align' => $mobile_alignment, ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; } if ( astra_support_footer_widget_right_margin() && ! is_customize_preview() ) { $footer_area_css_output = array( '.footer-widget-area.widget-area.site-footer-focus-item' => array( 'width' => 'auto', ), '.ast-footer-row-inline .footer-widget-area.widget-area.site-footer-focus-item' => array( 'width' => '100%', ), ); $dynamic_css .= astra_parse_css( $footer_area_css_output ); } $dynamic_css .= Astra_Widget_Component_Dynamic_CSS::astra_widget_dynamic_css( 'footer' ); return $dynamic_css; } widget/class-astra-footer-widget-component-loader.php 0000644 00000003304 15105146410 0016773 0 ustar 00 <?php /** * WIDGET Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ class Astra_Footer_Widget_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-widget-customizer-preview-js', ASTRA_BUILDER_FOOTER_WIDGET_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); // Localize variables for WIDGET JS. wp_localize_script( 'astra-footer-widget-customizer-preview-js', 'AstraBuilderWidgetData', array( 'footer_widget_count' => defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_widgets, 'tablet_break_point' => astra_get_tablet_breakpoint(), 'mobile_break_point' => astra_get_mobile_breakpoint(), 'is_flex_based_css' => Astra_Builder_Helper::apply_flex_based_css(), 'has_block_editor' => astra_has_widgets_block_editor(), ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Widget_Component_Loader(); widget/assets/js/unminified/customizer-preview.js 0000644 00000000640 15105146410 0016312 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 Builder * @since 3.0.0 */ ( function( $ ) { astra_builder_widget_css('footer'); } )( jQuery ); widget/assets/js/minified/customizer-preview.min.js 0000644 00000000052 15105146410 0016526 0 ustar 00 jQuery,astra_builder_widget_css("footer"); copyright/dynamic-css/dynamic.css.php 0000644 00000006412 15105146410 0013712 0 ustar 00 <?php /** * Copyright control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Copyright CSS */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_copyright_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_fb_copyright_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'copyright', 'footer' ) ) { return $dynamic_css; } $_section = 'section-footer-copyright'; $selector = '.ast-footer-copyright '; $visibility_selector = '.ast-footer-copyright.ast-builder-layout-element'; $alignment = astra_get_option( 'footer-copyright-alignment' ); $desktop_alignment = isset( $alignment['desktop'] ) ? $alignment['desktop'] : ''; $tablet_alignment = isset( $alignment['tablet'] ) ? $alignment['tablet'] : ''; $mobile_alignment = isset( $alignment['mobile'] ) ? $alignment['mobile'] : ''; $margin = astra_get_option( $_section . '-margin' ); /** * Copyright CSS. */ $css_output_desktop = array( '.ast-footer-copyright' => array( 'text-align' => $desktop_alignment, ), $selector => array( 'color' => astra_get_option( 'footer-copyright-color', astra_get_option( 'text-color' ) ), // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'desktop' ), ), ); $css_output_tablet = array( '.ast-footer-copyright' => array( 'text-align' => $tablet_alignment, ), $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'tablet' ), ), ); $css_output_mobile = array( '.ast-footer-copyright' => array( 'text-align' => $mobile_alignment, ), $selector => array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'mobile' ), ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; $dynamic_css .= Astra_Builder_Base_Dynamic_CSS::prepare_advanced_typography_css( $_section, $selector ); $dynamic_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $visibility_selector ); return $dynamic_css; } copyright/class-astra-footer-copyright-component-loader.php 0000644 00000002241 15105146410 0020244 0 ustar 00 <?php /** * Copyright Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ class Astra_Footer_Copyright_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-copyright-customizer-preview-js', ASTRA_BUILDER_FOOTER_COPYRIGHT_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Copyright_Component_Loader(); copyright/class-astra-footer-copyright-component.php 0000644 00000002470 15105146410 0017004 0 ustar 00 <?php /** * Copyright component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_COPYRIGHT_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/copyright' ); define( 'ASTRA_BUILDER_FOOTER_COPYRIGHT_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/copyright' ); if ( ! class_exists( 'Astra_Footer_Copyright_Component' ) ) { /** * Astra_Footer_Copyright_Component * * @since 3.0.0 */ class Astra_Footer_Copyright_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_COPYRIGHT_DIR . '/class-astra-footer-copyright-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_COPYRIGHT_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Copyright_Component(); } copyright/assets/js/unminified/customizer-preview.js 0000644 00000011232 15105146410 0017036 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 Builder * @since 3.0.0 */ ( function( $ ) { var selector = '.ast-footer-copyright'; var visibility_selector = '.ast-footer-copyright.ast-builder-layout-element'; var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; // HTML color. astra_css( 'astra-settings[footer-copyright-color]', 'color', selector ); // Typography CSS Generation. astra_responsive_font_size( 'astra-settings[font-size-section-footer-copyright]', selector ); wp.customize( 'astra-settings[footer-copyright-alignment]', function( value ) { value.bind( function( alignment ) { if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { var dynamicStyle = ''; dynamicStyle += '.ast-footer-copyright {'; dynamicStyle += 'text-align: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.ast-footer-copyright {'; dynamicStyle += 'text-align: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.ast-footer-copyright {'; dynamicStyle += 'text-align: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-copyright-alignment', dynamicStyle ); } } ); } ); // Margin. wp.customize( 'astra-settings[section-footer-copyright-margin]', function( value ) { value.bind( function( margin ) { if( margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' || margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' || margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-copyright-margin', dynamicStyle ); } } ); } ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( 'section-footer-copyright', visibility_selector ); } )( jQuery ); copyright/assets/js/minified/customizer-preview.min.js 0000644 00000003752 15105146410 0017265 0 ustar 00 (()=>{var i=".ast-footer-copyright",e=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544;astra_css("astra-settings[footer-copyright-color]","color",i),astra_responsive_font_size("astra-settings[font-size-section-footer-copyright]",i),wp.customize("astra-settings[footer-copyright-alignment]",function(t){t.bind(function(t){var o;""==t.desktop&&""==t.tablet&&""==t.mobile||(o="",o=(o=(o=(o=(o=(o+=".ast-footer-copyright {")+"text-align: "+t.desktop+";} ")+"@media (max-width: "+e+"px) {.ast-footer-copyright {")+"text-align: "+t.tablet+";} ")+"} @media (max-width: "+a+"px) {")+".ast-footer-copyright {text-align: "+t.mobile+";} } ",astra_add_dynamic_css("footer-copyright-alignment",o))})}),wp.customize("astra-settings[section-footer-copyright-margin]",function(t){t.bind(function(t){var o;""==t.desktop.bottom&&""==t.desktop.top&&""==t.desktop.left&&""==t.desktop.right&&""==t.tablet.bottom&&""==t.tablet.top&&""==t.tablet.left&&""==t.tablet.right&&""==t.mobile.bottom&&""==t.mobile.top&&""==t.mobile.left&&""==t.mobile.right||(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o="")+i+" {margin-left: "+t.desktop.left+t["desktop-unit"]+";")+"margin-right: "+t.desktop.right+t["desktop-unit"]+";")+"margin-top: "+t.desktop.top+t["desktop-unit"]+";")+"margin-bottom: "+t.desktop.bottom+t["desktop-unit"]+";")+"} @media (max-width: "+e+"px) {")+i+" {margin-left: "+t.tablet.left+t["tablet-unit"]+";")+"margin-right: "+t.tablet.right+t["tablet-unit"]+";")+"margin-top: "+t.tablet.top+t["desktop-unit"]+";")+"margin-bottom: "+t.tablet.bottom+t["desktop-unit"]+";} ")+"} @media (max-width: "+a+"px) {")+i+" {margin-left: "+t.mobile.left+t["mobile-unit"]+";")+"margin-right: "+t.mobile.right+t["mobile-unit"]+";")+"margin-top: "+t.mobile.top+t["desktop-unit"]+";")+"margin-bottom: "+t.mobile.bottom+t["desktop-unit"]+";} } ",astra_add_dynamic_css("footer-copyright-margin",o))})}),astra_builder_visibility_css("section-footer-copyright",".ast-footer-copyright.ast-builder-layout-element")})(jQuery); above-footer/class-astra-above-footer-component-loader.php 0000644 00000002235 15105146410 0017713 0 ustar 00 <?php /** * Above Footer Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Above Footer Initialization * * @since 3.0.0 */ class Astra_Above_Footer_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-above-customizer-preview-js', ASTRA_BUILDER_FOOTER_ABOVE_FOOTER_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Above_Footer_Component_Loader(); above-footer/dynamic-css/dynamic.css.php 0000644 00000014152 15105146410 0014272 0 ustar 00 <?php /** * Above Footer control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Above Footer CSS */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_above_footer_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for above Footer. * * @since 3.0.0 */ function astra_fb_above_footer_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { if ( ! ( Astra_Builder_Helper::is_footer_row_empty( 'above' ) || is_customize_preview() ) ) { return $dynamic_css; } $_section = 'section-above-footer-builder'; $selector = '.site-above-footer-wrap[data-section="section-above-footer-builder"]'; $footer_bg = astra_get_option( 'hba-footer-bg-obj-responsive' ); $footer_top_border_size = astra_get_option( 'hba-footer-separator' ); $footer_top_border_color = astra_get_option( 'hba-footer-top-border-color' ); $footer_height = astra_get_option( 'hba-footer-height' ); $footer_width = astra_get_option( 'hba-footer-layout-width' ); $content_width = astra_get_option( 'site-content-width' ); $inner_spacing = astra_get_option( 'hba-inner-spacing' ); $layout = astra_get_option( 'hba-footer-layout' ); $desk_layout = isset( $layout['desktop'] ) ? $layout['desktop'] : 'full'; $tab_layout = isset( $layout['tablet'] ) ? $layout['tablet'] : 'full'; $mob_layout = isset( $layout['mobile'] ) ? $layout['mobile'] : 'full'; $inner_spacing_desktop = isset( $inner_spacing['desktop'] ) ? $inner_spacing['desktop'] : ''; $inner_spacing_tablet = isset( $inner_spacing['tablet'] ) ? $inner_spacing['tablet'] : ''; $inner_spacing_mobile = isset( $inner_spacing['mobile'] ) ? $inner_spacing['mobile'] : ''; $css_output_desktop = array( '.site-above-footer-wrap' => array( 'padding-top' => '20px', 'padding-bottom' => '20px', ), $selector => astra_get_responsive_background_obj( $footer_bg, 'desktop' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_desktop, 'px' ), ), $selector . ' .ast-builder-grid-row, ' . $selector . ' .site-footer-section' => array( 'align-items' => astra_get_option( 'hba-footer-vertical-alignment' ), ), $selector . '.ast-footer-row-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), '.ast-builder-grid-row-' . $desk_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $desk_layout ], ), ); if ( isset( $footer_width ) && 'content' === $footer_width ) { $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['max-width'] = astra_get_css_value( $content_width, 'px' ); $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['min-height'] = astra_get_css_value( $footer_height, 'px' ); $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['margin-left'] = 'auto'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['margin-right'] = 'auto'; } else { $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['max-width'] = '100%'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['padding-left'] = '35px'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['padding-right'] = '35px'; } $css_output_desktop[ $selector ]['min-height'] = astra_get_css_value( $footer_height, 'px' ); if ( isset( $footer_top_border_size ) && 1 <= $footer_top_border_size ) { $css_output_desktop[ $selector ]['border-style'] = 'solid'; $css_output_desktop[ $selector ]['border-width'] = '0px'; $css_output_desktop[ $selector ]['border-top-width'] = astra_get_css_value( $footer_top_border_size, 'px' ); $css_output_desktop[ $selector ]['border-top-color'] = $footer_top_border_color; } $css_output_tablet = array( $selector => astra_get_responsive_background_obj( $footer_bg, 'tablet' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_tablet, 'px' ), 'grid-row-gap' => astra_get_css_value( $inner_spacing_tablet, 'px' ), ), $selector . '.ast-footer-row-tablet-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), $selector . '.ast-footer-row-tablet-stack .site-footer-section' => array( 'display' => 'block', 'margin-bottom' => '10px', ), '.ast-builder-grid-row-container.ast-builder-grid-row-tablet-' . $tab_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $tab_layout ], ), ); $css_output_mobile = array( $selector => astra_get_responsive_background_obj( $footer_bg, 'mobile' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_mobile, 'px' ), 'grid-row-gap' => astra_get_css_value( $inner_spacing_mobile, 'px' ), ), $selector . '.ast-footer-row-mobile-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), $selector . '.ast-footer-row-mobile-stack .site-footer-section' => array( 'display' => 'block', 'margin-bottom' => '10px', ), '.ast-builder-grid-row-container.ast-builder-grid-row-mobile-' . $mob_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $mob_layout ], ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; $dynamic_css .= Astra_Extended_Base_Dynamic_CSS::prepare_advanced_margin_padding_css( $_section, $selector ); $dynamic_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector, 'grid' ); return $dynamic_css; } above-footer/class-astra-above-footer.php 0000644 00000002431 15105146410 0014445 0 ustar 00 <?php /** * Above Footer component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_ABOVE_FOOTER_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/above-footer' ); define( 'ASTRA_BUILDER_FOOTER_ABOVE_FOOTER_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/above-footer' ); if ( ! class_exists( 'Astra_Above_Footer' ) ) { /** * Above Footer Initial Setup * * @since 3.0.0 */ class Astra_Above_Footer { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_ABOVE_FOOTER_DIR . '/class-astra-above-footer-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_ABOVE_FOOTER_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Above_Footer(); } above-footer/assets/js/unminified/customizer-preview.js 0000644 00000010247 15105146410 0017423 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 * @since 3.0.0 */ ( function( $ ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; var section = 'section-above-footer-builder'; var selector = '.site-above-footer-wrap[data-section="section-above-footer-builder"]'; // Footer Vertical Alignment. astra_css( 'astra-settings[hba-footer-vertical-alignment]', 'align-items', selector + ' .ast-builder-grid-row, ' + selector + ' .site-footer-section' ); // Border Bottom width. wp.customize( 'astra-settings[hba-footer-separator]', function( setting ) { setting.bind( function( separator ) { var dynamicStyle = ''; if ( '' !== separator ) { dynamicStyle = selector + ' {'; dynamicStyle += 'border-top-width: ' + separator + 'px;'; dynamicStyle += 'border-top-style: solid'; dynamicStyle += '} '; } astra_add_dynamic_css( 'hba-footer-separator', dynamicStyle ); } ); } ); // Inner Space. wp.customize( 'astra-settings[hba-inner-spacing]', function( value ) { value.bind( function( spacing ) { var dynamicStyle = ''; if ( spacing.desktop != '' ) { dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.desktop + 'px;'; dynamicStyle += '} '; } if ( spacing.tablet != '' ) { dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.tablet + 'px;'; dynamicStyle += 'grid-row-gap: ' + spacing.tablet + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; } if ( spacing.mobile != '' ) { dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.mobile + 'px;'; dynamicStyle += 'grid-row-gap: ' + spacing.mobile + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( 'hba-inner-spacing-toggle-button', dynamicStyle ); } ); } ); // Border Color. wp.customize( 'astra-settings[hba-footer-top-border-color]', function( setting ) { setting.bind( function( color ) { var dynamicStyle = ''; if ( '' !== color ) { dynamicStyle = selector + ' {'; dynamicStyle += 'border-top-color: ' + color + ';'; dynamicStyle += 'border-top-style: solid'; dynamicStyle += '} '; } astra_add_dynamic_css( 'hba-footer-top-border-color', dynamicStyle ); } ); } ); // Primary Header - Layout. wp.customize( 'astra-settings[hba-footer-layout-width]', function( setting ) { setting.bind( function( layout ) { var dynamicStyle = ''; if ( 'content' == layout ) { dynamicStyle = selector + ' .ast-builder-grid-row {'; dynamicStyle += 'max-width: ' + AstraBuilderPrimaryFooterData.footer_content_width + 'px;'; dynamicStyle += 'margin-left: auto;'; dynamicStyle += 'margin-right: auto;'; dynamicStyle += '} '; } if ( 'full' == layout ) { dynamicStyle = selector + ' .ast-builder-grid-row {'; dynamicStyle += 'max-width: 100%;'; dynamicStyle += 'padding-right: 35px; padding-left: 35px;'; dynamicStyle += '} '; } astra_add_dynamic_css( 'hba-footer-layout-width', dynamicStyle ); } ); } ); // Responsive BG styles > Above Footer Row. astra_apply_responsive_background_css( 'astra-settings[hba-footer-bg-obj-responsive]', selector, 'desktop' ); astra_apply_responsive_background_css( 'astra-settings[hba-footer-bg-obj-responsive]', selector, 'tablet' ); astra_apply_responsive_background_css( 'astra-settings[hba-footer-bg-obj-responsive]', selector, 'mobile' ); // Advanced CSS Generation. astra_builder_advanced_css( section, selector ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector, 'grid' ); } )( jQuery ); above-footer/assets/js/minified/customizer-preview.min.js 0000644 00000004133 15105146410 0017637 0 ustar 00 (()=>{var r=astraBuilderPreview.tablet_break_point||768,o=astraBuilderPreview.mobile_break_point||544,t="section-above-footer-builder",e='.site-above-footer-wrap[data-section="section-above-footer-builder"]';astra_css("astra-settings[hba-footer-vertical-alignment]","align-items",e+" .ast-builder-grid-row, "+e+" .site-footer-section"),wp.customize("astra-settings[hba-footer-separator]",function(t){t.bind(function(t){var a="";""!==t&&(a=(a=e+" {")+"border-top-width: "+t+"px;border-top-style: solid} "),astra_add_dynamic_css("hba-footer-separator",a)})}),wp.customize("astra-settings[hba-inner-spacing]",function(t){t.bind(function(t){var a="";""!=t.desktop&&(a=(a+=e+" .ast-builder-grid-row {")+"grid-column-gap: "+t.desktop+"px;} "),""!=t.tablet&&(a=(a=(a+="@media (max-width: "+r+"px) {")+e+" .ast-builder-grid-row {grid-column-gap: "+t.tablet+"px;")+"grid-row-gap: "+t.tablet+"px;} } "),""!=t.mobile&&(a=(a=(a+="@media (max-width: "+o+"px) {")+e+" .ast-builder-grid-row {grid-column-gap: "+t.mobile+"px;")+"grid-row-gap: "+t.mobile+"px;} } "),astra_add_dynamic_css("hba-inner-spacing-toggle-button",a)})}),wp.customize("astra-settings[hba-footer-top-border-color]",function(t){t.bind(function(t){var a="";""!==t&&(a=(a=e+" {")+"border-top-color: "+t+";border-top-style: solid} "),astra_add_dynamic_css("hba-footer-top-border-color",a)})}),wp.customize("astra-settings[hba-footer-layout-width]",function(t){t.bind(function(t){var a="";"content"==t&&(a=(a=e+" .ast-builder-grid-row {")+"max-width: "+AstraBuilderPrimaryFooterData.footer_content_width+"px;margin-left: auto;margin-right: auto;} "),"full"==t&&(a=e+" .ast-builder-grid-row {",a+="max-width: 100%;padding-right: 35px; padding-left: 35px;} "),astra_add_dynamic_css("hba-footer-layout-width",a)})}),astra_apply_responsive_background_css("astra-settings[hba-footer-bg-obj-responsive]",e,"desktop"),astra_apply_responsive_background_css("astra-settings[hba-footer-bg-obj-responsive]",e,"tablet"),astra_apply_responsive_background_css("astra-settings[hba-footer-bg-obj-responsive]",e,"mobile"),astra_builder_advanced_css(t,e),astra_builder_visibility_css(t,e,"grid")})(jQuery); html/class-astra-footer-html-component.php 0000644 00000002242 15105146410 0014671 0 ustar 00 <?php /** * HTML component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_HTML_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/html' ); define( 'ASTRA_BUILDER_FOOTER_HTML_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/html' ); /** * Heading Initial Setup * * @since 3.0.0 */ class Astra_Footer_Html_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_HTML_DIR . '/class-astra-footer-html-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_HTML_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Html_Component(); html/dynamic-css/dynamic.css.php 0000644 00000005562 15105146410 0012653 0 ustar 00 <?php /** * HTML control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Heading Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_html_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_fb_html_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Html_Component_Dynamic_CSS::astra_html_dynamic_css( 'footer' ); $static_css_flg = false; $stati_css_output = ''; for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_html; $index++ ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'html-' . $index, 'footer' ) ) { continue; } $static_css_flg = true; $selector = '.footer-widget-area[data-section="section-fb-html-' . $index . '"]'; $alignment = astra_get_option( 'footer-html-' . $index . '-alignment' ); $desktop_alignment = isset( $alignment['desktop'] ) ? $alignment['desktop'] : ''; $tablet_alignment = isset( $alignment['tablet'] ) ? $alignment['tablet'] : ''; $mobile_alignment = isset( $alignment['mobile'] ) ? $alignment['mobile'] : ''; $is_rtl = is_rtl(); $desktop_text_alignment = $is_rtl ? ( $desktop_alignment === 'left' ? 'right' : ( $desktop_alignment === 'right' ? 'left' : $desktop_alignment ) ) : $desktop_alignment; $tablet_text_alignment = $is_rtl ? ( $tablet_alignment === 'left' ? 'right' : ( $tablet_alignment === 'right' ? 'left' : $tablet_alignment ) ) : $tablet_alignment; $mobile_text_alignment = $is_rtl ? ( $mobile_alignment === 'left' ? 'right' : ( $mobile_alignment === 'right' ? 'left' : $mobile_alignment ) ) : $mobile_alignment; /** * Copyright CSS. */ $css_output_desktop = array( $selector . ' .ast-builder-html-element' => array( 'text-align' => $desktop_text_alignment, ), ); $css_output_tablet = array( $selector . ' .ast-builder-html-element' => array( 'text-align' => $tablet_text_alignment, ), ); $css_output_mobile = array( $selector . ' .ast-builder-html-element' => array( 'text-align' => $mobile_text_alignment, ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; } if ( true === $static_css_flg ) { $stati_css_output .= astra_parse_css( array( '.footer-widget-area[data-section^="section-fb-html-"] .ast-builder-html-element' => array( 'text-align' => 'center', ), ) ); } return $stati_css_output . $dynamic_css; } html/class-astra-footer-html-component-loader.php 0000644 00000003044 15105146410 0016136 0 ustar 00 <?php /** * HTML Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ class Astra_Footer_Html_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-html-customizer-preview-js', ASTRA_BUILDER_FOOTER_HTML_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); // Localize variables for HTML JS. wp_localize_script( 'astra-footer-html-customizer-preview-js', 'AstraBuilderHTMLData', array( 'component_limit' => defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_html, 'tablet_break_point' => astra_get_tablet_breakpoint(), 'mobile_break_point' => astra_get_mobile_breakpoint(), ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Html_Component_Loader(); html/assets/js/unminified/customizer-preview.js 0000644 00000003626 15105146410 0016002 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 Builder * @since 3.0.0 */ ( function( $ ) { var tablet_break_point = AstraBuilderHTMLData.tablet_break_point || 768, mobile_break_point = AstraBuilderHTMLData.mobile_break_point || 544; astra_builder_html_css( 'footer', AstraBuilderHTMLData.component_limit ); for( var index = 1; index <= AstraBuilderHTMLData.component_limit ; index++ ) { (function( index ) { wp.customize( 'astra-settings[footer-html-'+ index +'-alignment]', function( value ) { value.bind( function( alignment ) { if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { var dynamicStyle = ''; dynamicStyle += '.footer-widget-area[data-section="section-fb-html-'+ index +'"] .ast-builder-html-element {'; dynamicStyle += 'text-align: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.footer-widget-area[data-section="section-fb-html-'+ index +'"] .ast-builder-html-element {'; dynamicStyle += 'text-align: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.footer-widget-area[data-section="section-fb-html-'+ index +'"] .ast-builder-html-element {'; dynamicStyle += 'text-align: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-html-'+ index +'-alignment', dynamicStyle ); } } ); } ); })( index ); } } )( jQuery ); html/assets/js/minified/customizer-preview.min.js 0000644 00000001577 15105146410 0016224 0 ustar 00 (()=>{var i=AstraBuilderHTMLData.tablet_break_point||768,l=AstraBuilderHTMLData.mobile_break_point||544;astra_builder_html_css("footer",AstraBuilderHTMLData.component_limit);for(var t=1;t<=AstraBuilderHTMLData.component_limit;t++)(a=>{wp.customize("astra-settings[footer-html-"+a+"-alignment]",function(t){t.bind(function(t){var e;""==t.desktop&&""==t.tablet&&""==t.mobile||(e="",e=(e=(e=(e=(e=(e+='.footer-widget-area[data-section="section-fb-html-'+a+'"] .ast-builder-html-element {')+"text-align: "+t.desktop+";} ")+"@media (max-width: "+i+'px) {.footer-widget-area[data-section="section-fb-html-'+a+'"] .ast-builder-html-element {')+"text-align: "+t.tablet+";} ")+"} @media (max-width: "+l+"px) {")+'.footer-widget-area[data-section="section-fb-html-'+a+'"] .ast-builder-html-element {text-align: '+t.mobile+";} } ",astra_add_dynamic_css("footer-html-"+a+"-alignment",e))})})})(t)})(jQuery); social-icon/class-astra-footer-social-icons-component-loader.php 0000644 00000003157 15105146410 0021016 0 ustar 00 <?php /** * Social Icons Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Social Icons Initialization * * @since 3.0.0 */ class Astra_Footer_Social_Icons_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-social-icons-customizer-preview-js', ASTRA_BUILDER_FOOTER_SOCIAL_ICONS_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); // Localize variables for Astra Breakpoints JS. wp_localize_script( 'astra-footer-social-icons-customizer-preview-js', 'astraBuilderFooterSocial', array( 'tablet_break_point' => astra_get_tablet_breakpoint(), 'mobile_break_point' => astra_get_mobile_breakpoint(), 'component_limit' => defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_social_icons, ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Social_Icons_Component_Loader(); social-icon/class-astra-footer-social-icons-component.php 0000644 00000002365 15105146410 0017552 0 ustar 00 <?php /** * Social Icons component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_SOCIAL_ICONS_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/social-icon' ); define( 'ASTRA_BUILDER_FOOTER_SOCIAL_ICONS_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/social-icon' ); /** * Social Icons Initial Setup * * @since 3.0.0 */ class Astra_Footer_Social_Icons_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_SOCIAL_ICONS_DIR . '/class-astra-footer-social-icons-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_SOCIAL_ICONS_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Social_Icons_Component(); social-icon/dynamic-css/dynamic.css.php 0000644 00000001320 15105146410 0014073 0 ustar 00 <?php /** * Social Icons control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Social Icons Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_social_icon_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Social Icons Colors. * * @since 3.0.0 */ function astra_fb_social_icon_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Social_Component_Dynamic_CSS::astra_social_dynamic_css( 'footer' ); return $dynamic_css; } social-icon/assets/js/unminified/customizer-preview.js 0000644 00000000704 15105146410 0017230 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 * @since 3.0.0 */ ( function( $ ) { astra_builder_social_css( 'footer', astraBuilderFooterSocial.component_limit ); } )( jQuery ); social-icon/assets/js/minified/customizer-preview.min.js 0000644 00000000123 15105146410 0017442 0 ustar 00 jQuery,astra_builder_social_css("footer",astraBuilderFooterSocial.component_limit); primary-footer/dynamic-css/dynamic.css.php 0000644 00000016423 15105146410 0014664 0 ustar 00 <?php /** * Primary Footer control - Dynamic CSS * * @package Astra Builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Primary Footer CSS */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_primary_footer_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Primary Footer. * * @since 3.0.0 */ function astra_fb_primary_footer_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $global_footer_bg = astra_get_option( 'footer-bg-obj-responsive' ); $css_output_desktop = array( '.site-footer' => astra_get_responsive_background_obj( $global_footer_bg, 'desktop' ), ); $dynamic_css .= astra_parse_css( $css_output_desktop ); // Advanced CSS for Header Builder. $dynamic_css .= Astra_Extended_Base_Dynamic_CSS::prepare_advanced_margin_padding_css( 'section-footer-builder-layout', '.ast-hfb-header .site-footer' ); $footer_css_output_tablet = array( '.site-footer' => astra_get_responsive_background_obj( $global_footer_bg, 'tablet' ), ); $footer_css_output_mobile = array( '.site-footer' => astra_get_responsive_background_obj( $global_footer_bg, 'mobile' ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $footer_css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $footer_css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; if ( ! ( Astra_Builder_Helper::is_footer_row_empty( 'primary' ) || is_customize_preview() ) ) { return $dynamic_css; } $_section = 'section-primary-footer-builder'; $selector = '.site-primary-footer-wrap[data-section="section-primary-footer-builder"]'; $footer_bg = astra_get_option( 'hb-footer-bg-obj-responsive' ); $footer_height = astra_get_option( 'hb-primary-footer-height' ); $footer_top_border_size = astra_get_option( 'hb-footer-main-sep' ); $footer_top_border_color = astra_get_option( 'hb-footer-main-sep-color' ); $footer_width = astra_get_option( 'hb-footer-layout-width' ); $content_width = astra_get_option( 'site-content-width' ); $inner_spacing = astra_get_option( 'hb-inner-spacing' ); $layout = astra_get_option( 'hb-footer-layout' ); $desk_layout = isset( $layout['desktop'] ) ? $layout['desktop'] : 'full'; $tab_layout = isset( $layout['tablet'] ) ? $layout['tablet'] : 'full'; $mob_layout = isset( $layout['mobile'] ) ? $layout['mobile'] : 'full'; $inner_spacing_desktop = isset( $inner_spacing['desktop'] ) ? $inner_spacing['desktop'] : ''; $inner_spacing_tablet = isset( $inner_spacing['tablet'] ) ? $inner_spacing['tablet'] : ''; $inner_spacing_mobile = isset( $inner_spacing['mobile'] ) ? $inner_spacing['mobile'] : ''; $css_output_desktop = array( '.site-primary-footer-wrap' => array( 'padding-top' => '45px', 'padding-bottom' => '45px', ), $selector => astra_get_responsive_background_obj( $footer_bg, 'desktop' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_desktop, 'px' ), ), $selector . ' .ast-builder-grid-row, ' . $selector . ' .site-footer-section' => array( 'align-items' => astra_get_option( 'hb-footer-vertical-alignment' ), ), $selector . '.ast-footer-row-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), '.ast-builder-grid-row-' . $desk_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $desk_layout ], ), ); $css_output_desktop[ $selector ]['min-height'] = astra_get_css_value( $footer_height, 'px' ); if ( isset( $footer_top_border_size ) && 1 <= $footer_top_border_size ) { $css_output_desktop[ $selector ]['border-style'] = 'solid'; $css_output_desktop[ $selector ]['border-width'] = '0px'; $css_output_desktop[ $selector ]['border-top-width'] = astra_get_css_value( $footer_top_border_size, 'px' ); $css_output_desktop[ $selector ]['border-top-color'] = $footer_top_border_color; } if ( isset( $footer_width ) && 'content' === $footer_width ) { $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['max-width'] = astra_get_css_value( $content_width, 'px' ); $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['min-height'] = astra_get_css_value( $footer_height, 'px' ); $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['margin-left'] = 'auto'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['margin-right'] = 'auto'; } else { $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['max-width'] = '100%'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['padding-left'] = '35px'; $css_output_desktop[ $selector . ' .ast-builder-grid-row' ]['padding-right'] = '35px'; } $css_output_tablet = array( $selector => astra_get_responsive_background_obj( $footer_bg, 'tablet' ), '.site-footer' => astra_get_responsive_background_obj( $global_footer_bg, 'tablet' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_tablet, 'px' ), 'grid-row-gap' => astra_get_css_value( $inner_spacing_tablet, 'px' ), ), $selector . '.ast-footer-row-tablet-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), $selector . '.ast-footer-row-tablet-stack .site-footer-section' => array( 'display' => 'block', 'margin-bottom' => '10px', ), '.ast-builder-grid-row-container.ast-builder-grid-row-tablet-' . $tab_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $tab_layout ], ), ); $css_output_mobile = array( $selector => astra_get_responsive_background_obj( $footer_bg, 'mobile' ), '.site-footer' => astra_get_responsive_background_obj( $global_footer_bg, 'mobile' ), $selector . ' .ast-builder-grid-row' => array( 'grid-column-gap' => astra_get_css_value( $inner_spacing_mobile, 'px' ), 'grid-row-gap' => astra_get_css_value( $inner_spacing_mobile, 'px' ), ), $selector . '.ast-footer-row-mobile-inline .site-footer-section' => array( 'display' => 'flex', 'margin-bottom' => '0', ), $selector . '.ast-footer-row-mobile-stack .site-footer-section' => array( 'display' => 'block', 'margin-bottom' => '10px', ), '.ast-builder-grid-row-container.ast-builder-grid-row-mobile-' . $mob_layout . ' .ast-builder-grid-row' => array( 'grid-template-columns' => Astra_Builder_Helper::$grid_size_mapping[ $mob_layout ], ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; $dynamic_css .= Astra_Extended_Base_Dynamic_CSS::prepare_advanced_margin_padding_css( $_section, $selector ); $dynamic_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector, 'grid' ); return $dynamic_css; } primary-footer/class-astra-primary-footer-component-loader.php 0000644 00000002640 15105146410 0020671 0 ustar 00 <?php /** * Primary Footer Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Primary Footer Initialization * * @since 3.0.0 */ class Astra_Primary_Footer_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-primary-footer-customizer-preview-js', ASTRA_BUILDER_FOOTER_PRIMARY_FOOTER_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); // Localize variables for Footer JS. wp_localize_script( 'astra-heading-primary-customizer-preview-js', 'AstraBuilderPrimaryFooterData', array( 'footer_content_width' => astra_get_option( 'site-content-width' ), ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Primary_Footer_Component_Loader(); primary-footer/class-astra-primary-footer.php 0000644 00000002461 15105146410 0015426 0 ustar 00 <?php /** * Primary Footer component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_PRIMARY_FOOTER_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/primary-footer' ); define( 'ASTRA_BUILDER_FOOTER_PRIMARY_FOOTER_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/primary-footer' ); if ( ! class_exists( 'Astra_Primary_Footer' ) ) { /** * Primary Footer Initial Setup * * @since 3.0.0 */ class Astra_Primary_Footer { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_PRIMARY_FOOTER_DIR . '/class-astra-primary-footer-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_PRIMARY_FOOTER_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Primary_Footer(); } primary-footer/assets/js/unminified/customizer-preview.js 0000644 00000010272 15105146410 0020010 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 * @since 3.0.0 */ ( function( $ ) { var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; var section = 'section-primary-footer-builder'; var selector = '.site-primary-footer-wrap[data-section="section-primary-footer-builder"]'; // Primary Header - Layout. wp.customize( 'astra-settings[hb-footer-layout-width]', function( setting ) { setting.bind( function( layout ) { var dynamicStyle = ''; if ( 'content' == layout ) { dynamicStyle = selector + ' .ast-builder-grid-row {'; dynamicStyle += 'max-width: ' + AstraBuilderPrimaryFooterData.footer_content_width + 'px;'; dynamicStyle += 'margin-left: auto;'; dynamicStyle += 'margin-right: auto;'; dynamicStyle += '} '; } if ( 'full' == layout ) { dynamicStyle = selector + ' .ast-builder-grid-row {'; dynamicStyle += 'max-width: 100%;'; dynamicStyle += 'padding-right: 35px; padding-left: 35px;'; dynamicStyle += '} '; } astra_add_dynamic_css( 'hb-footer-layout-width', dynamicStyle ); } ); } ); // Footer Vertical Alignment. astra_css( 'astra-settings[hb-footer-vertical-alignment]', 'align-items', selector + ' .ast-builder-grid-row, ' + selector + ' .site-footer-section' ); // Inner Space. wp.customize( 'astra-settings[hb-inner-spacing]', function( value ) { value.bind( function( spacing ) { var dynamicStyle = ''; if ( spacing.desktop != '' ) { dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.desktop + 'px;'; dynamicStyle += '} '; } if ( spacing.tablet != '' ) { dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.tablet + 'px;'; dynamicStyle += 'grid-row-gap: ' + spacing.tablet + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; } if ( spacing.mobile != '' ) { dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .ast-builder-grid-row {'; dynamicStyle += 'grid-column-gap: ' + spacing.mobile + 'px;'; dynamicStyle += 'grid-row-gap: ' + spacing.mobile + 'px;'; dynamicStyle += '} '; dynamicStyle += '} '; } astra_add_dynamic_css( 'hb-inner-spacing-toggle-button', dynamicStyle ); } ); } ); // Border Top width. astra_css( 'astra-settings[hb-footer-main-sep]', 'border-top-width', selector, 'px' ); // Border Color. astra_css( 'astra-settings[hb-footer-main-sep-color]', 'border-color', selector ); var dynamicStyle = selector + ' {'; dynamicStyle += 'border-top-style: solid'; dynamicStyle += '} '; astra_add_dynamic_css( 'hb-footer-main-sep-color', dynamicStyle ); // Responsive BG styles > Primary Footer Row. astra_apply_responsive_background_css( 'astra-settings[hb-footer-bg-obj-responsive]', selector, 'desktop' ); astra_apply_responsive_background_css( 'astra-settings[hb-footer-bg-obj-responsive]', selector, 'tablet' ); astra_apply_responsive_background_css( 'astra-settings[hb-footer-bg-obj-responsive]', selector, 'mobile' ); // Responsive BG styles > Global Footer Row. astra_apply_responsive_background_css( 'astra-settings[footer-bg-obj-responsive]', '.site-footer', 'desktop' ); astra_apply_responsive_background_css( 'astra-settings[footer-bg-obj-responsive]', '.site-footer', 'tablet' ); astra_apply_responsive_background_css( 'astra-settings[footer-bg-obj-responsive]', '.site-footer', 'mobile' ); // Advanced CSS Generation. astra_builder_advanced_css( section, selector ); // Advanced CSS for Header Builder. astra_builder_advanced_css( 'section-footer-builder-layout', '.ast-hfb-header .site-footer' ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( section, selector, 'grid' ); } )( jQuery ); primary-footer/assets/js/minified/customizer-preview.min.js 0000644 00000004526 15105146410 0020234 0 ustar 00 (()=>{var s=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544,t="section-primary-footer-builder",e='.site-primary-footer-wrap[data-section="section-primary-footer-builder"]';wp.customize("astra-settings[hb-footer-layout-width]",function(t){t.bind(function(t){var r="";"content"==t&&(r=(r=e+" .ast-builder-grid-row {")+"max-width: "+AstraBuilderPrimaryFooterData.footer_content_width+"px;margin-left: auto;margin-right: auto;} "),"full"==t&&(r=e+" .ast-builder-grid-row {",r+="max-width: 100%;padding-right: 35px; padding-left: 35px;} "),astra_add_dynamic_css("hb-footer-layout-width",r)})}),astra_css("astra-settings[hb-footer-vertical-alignment]","align-items",e+" .ast-builder-grid-row, "+e+" .site-footer-section"),wp.customize("astra-settings[hb-inner-spacing]",function(t){t.bind(function(t){var r="";""!=t.desktop&&(r=(r+=e+" .ast-builder-grid-row {")+"grid-column-gap: "+t.desktop+"px;} "),""!=t.tablet&&(r=(r=(r+="@media (max-width: "+s+"px) {")+e+" .ast-builder-grid-row {grid-column-gap: "+t.tablet+"px;")+"grid-row-gap: "+t.tablet+"px;} } "),""!=t.mobile&&(r=(r=(r+="@media (max-width: "+a+"px) {")+e+" .ast-builder-grid-row {grid-column-gap: "+t.mobile+"px;")+"grid-row-gap: "+t.mobile+"px;} } "),astra_add_dynamic_css("hb-inner-spacing-toggle-button",r)})}),astra_css("astra-settings[hb-footer-main-sep]","border-top-width",e,"px"),astra_css("astra-settings[hb-footer-main-sep-color]","border-color",e),astra_add_dynamic_css("hb-footer-main-sep-color",'.site-primary-footer-wrap[data-section="section-primary-footer-builder"] {border-top-style: solid} '),astra_apply_responsive_background_css("astra-settings[hb-footer-bg-obj-responsive]",e,"desktop"),astra_apply_responsive_background_css("astra-settings[hb-footer-bg-obj-responsive]",e,"tablet"),astra_apply_responsive_background_css("astra-settings[hb-footer-bg-obj-responsive]",e,"mobile"),astra_apply_responsive_background_css("astra-settings[footer-bg-obj-responsive]",".site-footer","desktop"),astra_apply_responsive_background_css("astra-settings[footer-bg-obj-responsive]",".site-footer","tablet"),astra_apply_responsive_background_css("astra-settings[footer-bg-obj-responsive]",".site-footer","mobile"),astra_builder_advanced_css(t,e),astra_builder_advanced_css("section-footer-builder-layout",".ast-hfb-header .site-footer"),astra_builder_visibility_css(t,e,"grid")})(jQuery); button/dynamic-css/dynamic.css.php 0000644 00000004630 15105146410 0013215 0 ustar 00 <?php /** * Butons - Dynamic CSS * * @package Astra * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Heading Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_fb_button_dynamic_css' ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ function astra_fb_button_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { $dynamic_css .= Astra_Button_Component_Dynamic_CSS::astra_button_dynamic_css( 'footer' ); $fb_button_flag = false; for ( $index = 1; $index <= Astra_Builder_Helper::$num_of_footer_button; $index++ ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'button-' . $index, 'footer' ) ) { continue; } $fb_button_flag = true; $selector = '.ast-footer-button-' . $index . '[data-section="section-fb-button-' . $index . '"]'; $alignment = astra_get_option( 'footer-button-' . $index . '-alignment' ); $desktop_alignment = isset( $alignment['desktop'] ) ? $alignment['desktop'] : ''; $tablet_alignment = isset( $alignment['tablet'] ) ? $alignment['tablet'] : ''; $mobile_alignment = isset( $alignment['mobile'] ) ? $alignment['mobile'] : ''; /** * Copyright CSS. */ $css_output_desktop = array( $selector => array( 'justify-content' => $desktop_alignment, ), ); $css_output_tablet = array( $selector => array( 'justify-content' => $tablet_alignment, ), ); $css_output_mobile = array( $selector => array( 'justify-content' => $mobile_alignment, ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; } if ( true === $fb_button_flag ) { $static_css = array( '[data-section*="section-fb-button-"] .menu-link' => array( 'display' => 'none', ), '[CLASS*="ast-footer-button-"][data-section^="section-fb-button-"]' => array( 'justify-content' => 'center', ), '.site-footer-focus-item[CLASS*="ast-footer-button-"]' => array( 'display' => 'flex', ), ); return astra_parse_css( $static_css ) . $dynamic_css; } return $dynamic_css; } button/class-astra-footer-button-component-loader.php 0000644 00000004354 15105146410 0017061 0 ustar 00 <?php /** * Button Styling Loader for Astra theme. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ class Astra_Footer_Button_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); } /** * Add Font Family Callback * * @return void */ public function add_fonts() { /** * Footer - Button */ $num_of_footer_button = Astra_Builder_Helper::$num_of_footer_button; for ( $index = 1; $index <= $num_of_footer_button; $index++ ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'button-' . $index, 'footer' ) ) { continue; } $_prefix = 'button' . $index; $btn_font_family = astra_get_option( 'footer-' . $_prefix . '-font-family' ); $btn_font_weight = astra_get_option( 'footer-' . $_prefix . '-font-weight' ); Astra_Fonts::add_font( $btn_font_family, $btn_font_weight ); } } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-button-customizer-preview-js', ASTRA_FOOTER_BUTTON_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); // Localize variables for Button JS. wp_localize_script( 'astra-footer-button-customizer-preview-js', 'AstraBuilderFooterButtonData', array( 'component_limit' => defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_button, 'tablet_break_point' => astra_get_tablet_breakpoint(), 'mobile_break_point' => astra_get_mobile_breakpoint(), ) ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Button_Component_Loader(); button/class-astra-footer-button-component.php 0000644 00000002242 15105146410 0015607 0 ustar 00 <?php /** * Footer Colors for Astra theme Buttpn. * * @package Astra * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_FOOTER_BUTTON_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/button' ); define( 'ASTRA_FOOTER_BUTTON_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/button' ); /** * Heading Initial Setup * * @since 3.0.0 */ class Astra_Footer_Button_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_FOOTER_BUTTON_DIR . '/class-astra-footer-button-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_FOOTER_BUTTON_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } } /** * Kicking this off by creating an object. */ new Astra_Footer_Button_Component(); button/assets/js/unminified/customizer-preview.js 0000644 00000000705 15105146410 0016344 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 * @since 3.0.0 */ ( function( $ ) { astra_builder_button_css( 'footer', AstraBuilderFooterButtonData.component_limit ); } )( jQuery ); button/assets/js/minified/customizer-preview.min.js 0000644 00000000127 15105146410 0016561 0 ustar 00 jQuery,astra_builder_button_css("footer",AstraBuilderFooterButtonData.component_limit); menu/class-astra-footer-menu-component-loader.php 0000644 00000002243 15105146410 0016136 0 ustar 00 <?php /** * Footer Navigation Menu Styling Loader for Astra theme. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Footer Navigation Menu Initialization * * @since 3.0.0 */ class Astra_Footer_Menu_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); } /** * Customizer Preview * * @since 3.0.0 */ public function preview_scripts() { /** * Load unminified if SCRIPT_DEBUG is true. */ /* Directory and Extension */ $dir_name = SCRIPT_DEBUG ? 'unminified' : 'minified'; $file_prefix = SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'astra-footer-menu-customizer-preview', ASTRA_BUILDER_FOOTER_MENU_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); } } /** * Kicking this off by creating the object of the class. */ new Astra_Footer_Menu_Component_Loader(); menu/dynamic-css/dynamic.css.php 0000644 00000035644 15105146410 0012657 0 ustar 00 <?php /** * Footer Menu Colors - Dynamic CSS * * @package astra-builder * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Footer Menu Colors */ add_filter( 'astra_dynamic_theme_css', 'astra_hb_footer_menu_dynamic_css', 11 ); /** * Dynamic CSS * * @param string $dynamic_css Astra Dynamic CSS. * @param string $dynamic_css_filtered Astra Dynamic CSS Filters. * @return String Generated dynamic CSS for Footer Menu Colors. * * @since 3.0.0 */ function astra_hb_footer_menu_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'menu', 'footer' ) ) { return $dynamic_css; } $_section = 'section-footer-menu'; $selector = '#astra-footer-menu'; $visibility_selector = '.footer-widget-area[data-section="section-footer-menu"]'; // Menu. $menu_resp_color = astra_get_option( 'footer-menu-color-responsive' ); $menu_resp_bg_color = astra_get_option( 'footer-menu-bg-obj-responsive' ); $menu_resp_color_hover = astra_get_option( 'footer-menu-h-color-responsive' ); $menu_resp_bg_color_hover = astra_get_option( 'footer-menu-h-bg-color-responsive' ); $menu_resp_color_active = astra_get_option( 'footer-menu-a-color-responsive' ); $menu_resp_bg_color_active = astra_get_option( 'footer-menu-a-bg-color-responsive' ); $alignment = astra_get_option( 'footer-menu-alignment' ); $desktop_alignment = isset( $alignment['desktop'] ) ? $alignment['desktop'] : ''; $tablet_alignment = isset( $alignment['tablet'] ) ? $alignment['tablet'] : ''; $mobile_alignment = isset( $alignment['mobile'] ) ? $alignment['mobile'] : ''; $menu_resp_color_desktop = isset( $menu_resp_color['desktop'] ) ? $menu_resp_color['desktop'] : ''; $menu_resp_color_tablet = isset( $menu_resp_color['tablet'] ) ? $menu_resp_color['tablet'] : ''; $menu_resp_color_mobile = isset( $menu_resp_color['mobile'] ) ? $menu_resp_color['mobile'] : ''; $menu_resp_color_hover_desktop = isset( $menu_resp_color_hover['desktop'] ) ? $menu_resp_color_hover['desktop'] : ''; $menu_resp_color_hover_tablet = isset( $menu_resp_color_hover['tablet'] ) ? $menu_resp_color_hover['tablet'] : ''; $menu_resp_color_hover_mobile = isset( $menu_resp_color_hover['mobile'] ) ? $menu_resp_color_hover['mobile'] : ''; $menu_resp_bg_color_hover_desktop = isset( $menu_resp_bg_color_hover['desktop'] ) ? $menu_resp_bg_color_hover['desktop'] : ''; $menu_resp_bg_color_hover_tablet = isset( $menu_resp_bg_color_hover['tablet'] ) ? $menu_resp_bg_color_hover['tablet'] : ''; $menu_resp_bg_color_hover_mobile = isset( $menu_resp_bg_color_hover['mobile'] ) ? $menu_resp_bg_color_hover['mobile'] : ''; $menu_resp_color_active_desktop = isset( $menu_resp_color_active['desktop'] ) ? $menu_resp_color_active['desktop'] : ''; $menu_resp_color_active_tablet = isset( $menu_resp_color_active['tablet'] ) ? $menu_resp_color_active['tablet'] : ''; $menu_resp_color_active_mobile = isset( $menu_resp_color_active['mobile'] ) ? $menu_resp_color_active['mobile'] : ''; $menu_resp_bg_color_active_desktop = isset( $menu_resp_bg_color_active['desktop'] ) ? $menu_resp_bg_color_active['desktop'] : ''; $menu_resp_bg_color_active_tablet = isset( $menu_resp_bg_color_active['tablet'] ) ? $menu_resp_bg_color_active['tablet'] : ''; $menu_resp_bg_color_active_mobile = isset( $menu_resp_bg_color_active['mobile'] ) ? $menu_resp_bg_color_active['mobile'] : ''; // Typography. $menu_font_size = astra_get_option( 'footer-menu-font-size' ); $menu_font_size_desktop = isset( $menu_font_size['desktop'] ) ? $menu_font_size['desktop'] : ''; $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_desktop_unit = isset( $menu_font_size['desktop-unit'] ) ? $menu_font_size['desktop-unit'] : ''; $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'] : ''; // Menu Spacing. $menu_spacing = astra_get_option( 'footer-main-menu-spacing' ); // - Desktop. $menu_desktop_spacing_top = isset( $menu_spacing['desktop']['top'] ) ? $menu_spacing['desktop']['top'] : ''; $menu_desktop_spacing_bottom = isset( $menu_spacing['desktop']['bottom'] ) ? $menu_spacing['desktop']['bottom'] : ''; $menu_desktop_spacing_right = isset( $menu_spacing['desktop']['right'] ) ? $menu_spacing['desktop']['right'] : ''; $menu_desktop_spacing_left = isset( $menu_spacing['desktop']['left'] ) ? $menu_spacing['desktop']['left'] : ''; $menu_desktop_spacing_unit = isset( $menu_spacing['desktop-unit'] ) && ! empty( $menu_spacing['desktop-unit'] ) ? $menu_spacing['desktop-unit'] : ''; // - Tablet. /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_tablet_spacing_top = isset( $menu_spacing['tablet']['top'] ) ? $menu_spacing['tablet']['top'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_tablet_spacing_bottom = isset( $menu_spacing['tablet']['bottom'] ) ? $menu_spacing['tablet']['bottom'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_tablet_spacing_right = isset( $menu_spacing['tablet']['right'] ) ? $menu_spacing['tablet']['right'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_tablet_spacing_left = isset( $menu_spacing['tablet']['left'] ) ? $menu_spacing['tablet']['left'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_tablet_spacing_unit = isset( $menu_spacing['tablet-unit'] ) && ! empty( $menu_spacing['tablet-unit'] ) ? $menu_spacing['tablet-unit'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort // - Mobile. /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_mobile_spacing_top = isset( $menu_spacing['mobile']['top'] ) ? $menu_spacing['mobile']['top'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_mobile_spacing_bottom = isset( $menu_spacing['mobile']['bottom'] ) ? $menu_spacing['mobile']['bottom'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_mobile_spacing_right = isset( $menu_spacing['mobile']['right'] ) ? $menu_spacing['mobile']['right'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_mobile_spacing_left = isset( $menu_spacing['mobile']['left'] ) ? $menu_spacing['mobile']['left'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $menu_mobile_spacing_unit = isset( $menu_spacing['mobile-unit'] ) && ! empty( $menu_spacing['mobile-unit'] ) ? $menu_spacing['mobile-unit'] : ''; /** @psalm-suppress PossiblyUndefinedStringArrayOffset */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $margin = astra_get_option( $_section . '-margin' ); $arr_footer_ul_desktop = array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'desktop' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'desktop' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'desktop' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'desktop' ), ); $arr_footer_ul_desktop = array_merge( $arr_footer_ul_desktop, astra_get_responsive_background_obj( $menu_resp_bg_color, 'desktop' ) ); $css_output_desktop = array( '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-horizontal-menu' => array( 'justify-content' => $desktop_alignment, ), '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-vertical-menu .menu-item' => array( 'align-items' => $desktop_alignment, ), $selector . ' .menu-item > a' => array( 'color' => $menu_resp_color_desktop, 'font-size' => astra_get_font_css_value( $menu_font_size_desktop, $menu_font_size_desktop_unit ), 'padding-top' => astra_get_css_value( $menu_desktop_spacing_top, $menu_desktop_spacing_unit ), 'padding-bottom' => astra_get_css_value( $menu_desktop_spacing_bottom, $menu_desktop_spacing_unit ), 'padding-left' => astra_get_css_value( $menu_desktop_spacing_left, $menu_desktop_spacing_unit ), 'padding-right' => astra_get_css_value( $menu_desktop_spacing_right, $menu_desktop_spacing_unit ), ), $selector . ' .menu-item:hover > a' => array( 'color' => $menu_resp_color_hover_desktop, 'background' => $menu_resp_bg_color_hover_desktop, ), $selector . ' .menu-item.current-menu-item > a' => array( 'color' => $menu_resp_color_active_desktop, 'background' => $menu_resp_bg_color_active_desktop, ), $selector => $arr_footer_ul_desktop, ); $arr_footer_ul_tablet = array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'tablet' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'tablet' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'tablet' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'tablet' ), ); $arr_footer_ul_tablet = array_merge( $arr_footer_ul_tablet, astra_get_responsive_background_obj( $menu_resp_bg_color, 'tablet' ) ); $css_output_tablet = array( '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-horizontal-menu' => array( 'justify-content' => $tablet_alignment, 'display' => 'flex', ), '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-vertical-menu' => array( 'display' => 'grid', 'justify-content' => $tablet_alignment, ), '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-vertical-menu .menu-item' => array( 'align-items' => $tablet_alignment, ), $selector . ' .menu-item > a' => array( 'color' => $menu_resp_color_tablet, 'font-size' => astra_get_font_css_value( $menu_font_size_tablet, $menu_font_size_tablet_unit ), 'padding-top' => astra_get_css_value( $menu_tablet_spacing_top, $menu_tablet_spacing_unit ), 'padding-bottom' => astra_get_css_value( $menu_tablet_spacing_bottom, $menu_tablet_spacing_unit ), 'padding-left' => astra_get_css_value( $menu_tablet_spacing_left, $menu_tablet_spacing_unit ), 'padding-right' => astra_get_css_value( $menu_tablet_spacing_right, $menu_tablet_spacing_unit ), ), $selector . ' .menu-item:hover > a' => array( 'color' => $menu_resp_color_hover_tablet, 'background' => $menu_resp_bg_color_hover_tablet, ), $selector . ' .menu-item.current-menu-item > a' => array( 'color' => $menu_resp_color_active_tablet, 'background' => $menu_resp_bg_color_active_tablet, ), $selector => $arr_footer_ul_tablet, ); $arr_footer_ul_mobile = array( // Margin CSS. 'margin-top' => astra_responsive_spacing( $margin, 'top', 'mobile' ), 'margin-bottom' => astra_responsive_spacing( $margin, 'bottom', 'mobile' ), 'margin-left' => astra_responsive_spacing( $margin, 'left', 'mobile' ), 'margin-right' => astra_responsive_spacing( $margin, 'right', 'mobile' ), ); $arr_footer_ul_mobile = array_merge( $arr_footer_ul_mobile, astra_get_responsive_background_obj( $menu_resp_bg_color, 'mobile' ) ); $css_output_mobile = array( $selector => astra_get_responsive_background_obj( $menu_resp_bg_color, 'mobile' ), '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-horizontal-menu' => array( 'justify-content' => $mobile_alignment, 'display' => 'flex', ), '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-vertical-menu' => array( 'display' => 'grid', 'justify-content' => $mobile_alignment, ), '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-vertical-menu .menu-item' => array( 'align-items' => $mobile_alignment, ), $selector . ' .menu-item > a' => array( 'color' => $menu_resp_color_mobile, 'font-size' => astra_get_font_css_value( $menu_font_size_mobile, $menu_font_size_mobile_unit ), 'padding-top' => astra_get_css_value( $menu_mobile_spacing_top, $menu_mobile_spacing_unit ), 'padding-bottom' => astra_get_css_value( $menu_mobile_spacing_bottom, $menu_mobile_spacing_unit ), 'padding-left' => astra_get_css_value( $menu_mobile_spacing_left, $menu_mobile_spacing_unit ), 'padding-right' => astra_get_css_value( $menu_mobile_spacing_right, $menu_mobile_spacing_unit ), ), $selector . ' .menu-item:hover > a' => array( 'color' => $menu_resp_color_hover_mobile, 'background' => $menu_resp_bg_color_hover_mobile, ), $selector . ' .menu-item.current-menu-item > a' => array( 'color' => $menu_resp_color_active_mobile, 'background' => $menu_resp_bg_color_active_mobile, ), $selector => $arr_footer_ul_mobile, ); /* Parse CSS from array() */ $css_output = astra_footer_menu_static_css(); $css_output .= astra_parse_css( $css_output_desktop ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $dynamic_css .= $css_output; $dynamic_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $visibility_selector, 'block' ); return $dynamic_css; } /** * Footer menu static CSS * * @since 3.5.0 * @return string */ function astra_footer_menu_static_css() { $footer_menu_css = ' .footer-nav-wrap .astra-footer-vertical-menu { display: grid; } @media (min-width: 769px) { .footer-nav-wrap .astra-footer-horizontal-menu li { margin: 0; } .footer-nav-wrap .astra-footer-horizontal-menu a { padding: 0 0.5em; } }'; if ( is_rtl() ) { $footer_menu_css .= ' @media (min-width: 769px) { .footer-nav-wrap .astra-footer-horizontal-menu li:first-child a { padding-right: 0; } .footer-nav-wrap .astra-footer-horizontal-menu li:last-child a { padding-left: 0; } }'; } else { $footer_menu_css .= ' @media (min-width: 769px) { .footer-nav-wrap .astra-footer-horizontal-menu li:first-child a { padding-left: 0; } .footer-nav-wrap .astra-footer-horizontal-menu li:last-child a { padding-right: 0; } }'; } return Astra_Enqueue_Scripts::trim_css( $footer_menu_css ); } menu/class-astra-footer-menu-component.php 0000644 00000007032 15105146410 0014673 0 ustar 00 <?php /** * Footer Navigation Menu component. * * @package Astra Builder * @link https://www.brainstormforce.com * @since Astra 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_BUILDER_FOOTER_MENU_DIR', ASTRA_THEME_DIR . 'inc/builder/type/footer/menu' ); define( 'ASTRA_BUILDER_FOOTER_MENU_URI', ASTRA_THEME_URI . 'inc/builder/type/footer/menu' ); /** * Footer Navigation Menu Initial Setup * * @since 3.0.0 */ class Astra_Footer_Menu_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_BUILDER_FOOTER_MENU_DIR . '/class-astra-footer-menu-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_BUILDER_FOOTER_MENU_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } /** * Secondary navigation markup * * @since 3.0.0. */ public static function menu_markup() { // Menu Layout. $desktop_menu_layout_class = ''; $tablet_menu_layout_class = ''; $mobile_menu_layout_class = ''; $menu_layout = astra_get_option( 'footer-menu-layout' ); $desktop_menu_layout = isset( $menu_layout['desktop'] ) ? $menu_layout['desktop'] : ''; $tablet_menu_layout = isset( $menu_layout['tablet'] ) ? $menu_layout['tablet'] : ''; $mobile_menu_layout = isset( $menu_layout['mobile'] ) ? $menu_layout['mobile'] : ''; if ( ! empty( $desktop_menu_layout ) ) { $desktop_menu_layout_class = 'astra-footer-' . esc_attr( $desktop_menu_layout ) . '-menu'; } if ( ! empty( $tablet_menu_layout ) ) { $tablet_menu_layout_class = 'astra-footer-tablet-' . esc_attr( $tablet_menu_layout ) . '-menu'; } if ( ! empty( $mobile_menu_layout ) ) { $mobile_menu_layout_class = 'astra-footer-mobile-' . esc_attr( $mobile_menu_layout ) . '-menu'; } /** * Filter the classes(array) for Menu (<ul>). * * @since 3.0.0 * @var Array */ $menu_classes = apply_filters( 'astra_menu_classes', array( 'ast-nav-menu', 'ast-flex', $desktop_menu_layout_class, $tablet_menu_layout_class, $mobile_menu_layout_class ) ); $menu_name = wp_get_nav_menu_name( 'footer_menu' ); $items_wrap = '<nav '; $items_wrap .= astra_attr( 'site-navigation', array( 'id' => 'footer-site-navigation', 'class' => 'site-navigation ast-flex-grow-1 navigation-accessibility footer-navigation', 'aria-label' => esc_attr__( 'Site Navigation: ', 'astra' ) . $menu_name, ) ); $items_wrap .= '>'; $items_wrap .= '<div class="footer-nav-wrap">'; $items_wrap .= '<ul id="%1$s" class="%2$s">%3$s</ul>'; $items_wrap .= '</div>'; $items_wrap .= '</nav>'; // To add default alignment for navigation which can be added through any third party plugin. // Do not add any CSS from theme except header alignment. if ( has_nav_menu( 'footer_menu' ) ) { wp_nav_menu( array( 'depth' => 1, 'menu_id' => 'astra-footer-menu', 'menu_class' => esc_attr( implode( ' ', $menu_classes ) ), 'container' => 'div', 'container_class' => 'footer-bar-navigation', 'items_wrap' => $items_wrap, 'theme_location' => 'footer_menu', ) ); } } } /** * Kicking this off by creating an object. */ new Astra_Footer_Menu_Component(); menu/assets/js/unminified/customizer-preview.js 0000644 00000024646 15105146410 0016007 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 * @since 3.0.0 */ ( function( $ ) { var selector = '#astra-footer-menu'; var visibility_selector = '.footer-widget-area[data-section="section-footer-menu"]'; var tablet_break_point = astraBuilderPreview.tablet_break_point || 768, mobile_break_point = astraBuilderPreview.mobile_break_point || 544; wp.customize( 'astra-settings[footer-menu-alignment]', function( value ) { value.bind( function( alignment ) { if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) { var dynamicStyle = ''; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-vertical-menu .menu-item {'; dynamicStyle += 'align-items: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-horizontal-menu {'; dynamicStyle += 'justify-content: ' + alignment['desktop'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-vertical-menu {'; dynamicStyle += 'justify-content:' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-vertical-menu .menu-item {'; dynamicStyle += 'display:' + 'grid;'; dynamicStyle += 'justify-content:' + alignment['tablet'] + ';'; dynamicStyle += 'align-items: ' + alignment['tablet'] + ';'; dynamicStyle += '} '; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-horizontal-menu {'; dynamicStyle += 'justify-content: ' + alignment['tablet'] + ';'; dynamicStyle += 'display: flex;'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-vertical-menu {'; dynamicStyle += 'display:' + 'grid;'; dynamicStyle += 'justify-content:' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-vertical-menu .menu-item {'; dynamicStyle += 'justify-content:' + alignment['mobile'] + ';'; dynamicStyle += 'align-items: ' + alignment['mobile'] + ';'; dynamicStyle += '} '; dynamicStyle += '.footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-horizontal-menu {'; dynamicStyle += 'justify-content: ' + alignment['mobile'] + ';'; dynamicStyle += 'display: flex;'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-menu-alignment', dynamicStyle ); } } ); } ); /** * Typography CSS. */ astra_responsive_font_size( 'astra-settings[footer-menu-font-size]', selector + ' .menu-item > a' ); /** * Menu - Colors */ astra_color_responsive_css( 'astra-footer-menu-preview', 'astra-settings[footer-menu-color-responsive]', 'color', selector + ' .menu-item > a' ); // Menu - Hover Color astra_color_responsive_css( 'astra-footer-menu-preview', 'astra-settings[footer-menu-h-color-responsive]', 'color', selector + ' .menu-item:hover > a' ); // Menu - Active Color astra_color_responsive_css( 'astra-footer-menu-preview', 'astra-settings[footer-menu-a-color-responsive]', 'color', selector + ' .menu-item.current-menu-item > a' ); // Responsive BG styles > Footer Menu. astra_apply_responsive_background_css( 'astra-settings[footer-menu-bg-obj-responsive]', selector, 'desktop' ); astra_apply_responsive_background_css( 'astra-settings[footer-menu-bg-obj-responsive]', selector, 'tablet' ); astra_apply_responsive_background_css( 'astra-settings[footer-menu-bg-obj-responsive]', selector, 'mobile' ); // Menu - Hover Background astra_color_responsive_css( 'astra-footer-menu-preview', 'astra-settings[footer-menu-h-bg-color-responsive]', 'background', selector + ' .menu-item:hover > a' ); // Menu - Active Background astra_color_responsive_css( 'astra-footer-menu-preview', 'astra-settings[footer-menu-a-bg-color-responsive]', 'background', selector + ' .menu-item.current-menu-item > a' ); /** * Spacing CSS. */ wp.customize( 'astra-settings[footer-main-menu-spacing]', function( value ) { value.bind( function( padding ) { if( padding.desktop.bottom != '' || padding.desktop.top != '' || padding.desktop.left != '' || padding.desktop.right != '' || padding.tablet.bottom != '' || padding.tablet.top != '' || padding.tablet.left != '' || padding.tablet.right != '' || padding.mobile.bottom != '' || padding.mobile.top != '' || padding.mobile.left != '' || padding.mobile.right != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' .menu-item > a {'; dynamicStyle += 'padding-left: ' + padding['desktop']['left'] + padding['desktop-unit'] + ';'; dynamicStyle += 'padding-right: ' + padding['desktop']['right'] + padding['desktop-unit'] + ';'; dynamicStyle += 'padding-top: ' + padding['desktop']['top'] + padding['desktop-unit'] + ';'; dynamicStyle += 'padding-bottom: ' + padding['desktop']['bottom'] + padding['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' .menu-item > a {'; dynamicStyle += 'padding-left: ' + padding['tablet']['left'] + padding['tablet-unit'] + ';'; dynamicStyle += 'padding-right: ' + padding['tablet']['right'] + padding['tablet-unit'] + ';'; dynamicStyle += 'padding-top: ' + padding['tablet']['top'] + padding['tablet-unit'] + ';'; dynamicStyle += 'padding-bottom: ' + padding['tablet']['bottom'] + padding['tablet-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' .menu-item > a {'; dynamicStyle += 'padding-left: ' + padding['mobile']['left'] + padding['mobile-unit'] + ';'; dynamicStyle += 'padding-right: ' + padding['mobile']['right'] + padding['mobile-unit'] + ';'; dynamicStyle += 'padding-top: ' + padding['mobile']['top'] + padding['mobile-unit'] + ';'; dynamicStyle += 'padding-bottom: ' + padding['mobile']['bottom'] + padding['mobile-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'footer-menu-spacing', dynamicStyle ); } } ); } ); // Margin. wp.customize( 'astra-settings[section-footer-menu-margin]', function( value ) { value.bind( function( margin ) { if( margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' || margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' || margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != '' ) { var dynamicStyle = ''; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {'; dynamicStyle += selector + ' {'; dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';'; dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';'; dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';'; dynamicStyle += '} '; dynamicStyle += '} '; astra_add_dynamic_css( 'section-footer-menu-margin', dynamicStyle ); } } ); } ); // Advanced Visibility CSS Generation. astra_builder_visibility_css( 'section-footer-menu', visibility_selector, 'block' ); } )( jQuery ); menu/assets/js/minified/customizer-preview.min.js 0000644 00000012121 15105146410 0016207 0 ustar 00 (()=>{var o="#astra-footer-menu",i=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544;wp.customize("astra-settings[footer-menu-alignment]",function(t){t.bind(function(t){var e;""==t.desktop&&""==t.tablet&&""==t.mobile||(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e="")+'.footer-widget-area[data-section="section-footer-menu"] .astra-footer-vertical-menu .menu-item {align-items: '+t.desktop+';} .footer-widget-area[data-section="section-footer-menu"] .astra-footer-horizontal-menu {')+"justify-content: "+t.desktop+";} ")+"@media (max-width: "+i+'px) {.footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-vertical-menu {')+"justify-content:"+t.tablet+';} .footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-vertical-menu .menu-item {display:grid;')+"justify-content:"+t.tablet+";align-items: "+t.tablet+';} .footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-horizontal-menu {')+"justify-content: "+t.tablet+";display: flex;} } ")+"@media (max-width: "+a+'px) {.footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-vertical-menu {')+"display:grid;justify-content:"+t.mobile+';} .footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-vertical-menu .menu-item {')+"justify-content:"+t.mobile+";align-items: "+t.mobile+';} .footer-widget-area[data-section="section-footer-menu"] .astra-footer-mobile-horizontal-menu {')+"justify-content: "+t.mobile+";display: flex;} } ",astra_add_dynamic_css("footer-menu-alignment",e))})}),astra_responsive_font_size("astra-settings[footer-menu-font-size]",o+" .menu-item > a"),astra_color_responsive_css("astra-footer-menu-preview","astra-settings[footer-menu-color-responsive]","color",o+" .menu-item > a"),astra_color_responsive_css("astra-footer-menu-preview","astra-settings[footer-menu-h-color-responsive]","color",o+" .menu-item:hover > a"),astra_color_responsive_css("astra-footer-menu-preview","astra-settings[footer-menu-a-color-responsive]","color",o+" .menu-item.current-menu-item > a"),astra_apply_responsive_background_css("astra-settings[footer-menu-bg-obj-responsive]",o,"desktop"),astra_apply_responsive_background_css("astra-settings[footer-menu-bg-obj-responsive]",o,"tablet"),astra_apply_responsive_background_css("astra-settings[footer-menu-bg-obj-responsive]",o,"mobile"),astra_color_responsive_css("astra-footer-menu-preview","astra-settings[footer-menu-h-bg-color-responsive]","background",o+" .menu-item:hover > a"),astra_color_responsive_css("astra-footer-menu-preview","astra-settings[footer-menu-a-bg-color-responsive]","background",o+" .menu-item.current-menu-item > a"),wp.customize("astra-settings[footer-main-menu-spacing]",function(t){t.bind(function(t){var e;""==t.desktop.bottom&&""==t.desktop.top&&""==t.desktop.left&&""==t.desktop.right&&""==t.tablet.bottom&&""==t.tablet.top&&""==t.tablet.left&&""==t.tablet.right&&""==t.mobile.bottom&&""==t.mobile.top&&""==t.mobile.left&&""==t.mobile.right||(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e="")+o+" .menu-item > a {padding-left: "+t.desktop.left+t["desktop-unit"]+";")+"padding-right: "+t.desktop.right+t["desktop-unit"]+";")+"padding-top: "+t.desktop.top+t["desktop-unit"]+";")+"padding-bottom: "+t.desktop.bottom+t["desktop-unit"]+";")+"} @media (max-width: "+i+"px) {")+o+" .menu-item > a {padding-left: "+t.tablet.left+t["tablet-unit"]+";")+"padding-right: "+t.tablet.right+t["tablet-unit"]+";")+"padding-top: "+t.tablet.top+t["tablet-unit"]+";")+"padding-bottom: "+t.tablet.bottom+t["tablet-unit"]+";} ")+"} @media (max-width: "+a+"px) {")+o+" .menu-item > a {padding-left: "+t.mobile.left+t["mobile-unit"]+";")+"padding-right: "+t.mobile.right+t["mobile-unit"]+";")+"padding-top: "+t.mobile.top+t["mobile-unit"]+";")+"padding-bottom: "+t.mobile.bottom+t["mobile-unit"]+";} } ",astra_add_dynamic_css("footer-menu-spacing",e))})}),wp.customize("astra-settings[section-footer-menu-margin]",function(t){t.bind(function(t){var e;""==t.desktop.bottom&&""==t.desktop.top&&""==t.desktop.left&&""==t.desktop.right&&""==t.tablet.bottom&&""==t.tablet.top&&""==t.tablet.left&&""==t.tablet.right&&""==t.mobile.bottom&&""==t.mobile.top&&""==t.mobile.left&&""==t.mobile.right||(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e="")+o+" {margin-left: "+t.desktop.left+t["desktop-unit"]+";")+"margin-right: "+t.desktop.right+t["desktop-unit"]+";")+"margin-top: "+t.desktop.top+t["desktop-unit"]+";")+"margin-bottom: "+t.desktop.bottom+t["desktop-unit"]+";")+"} @media (max-width: "+i+"px) {")+o+" {margin-left: "+t.tablet.left+t["tablet-unit"]+";")+"margin-right: "+t.tablet.right+t["tablet-unit"]+";")+"margin-top: "+t.tablet.top+t["desktop-unit"]+";")+"margin-bottom: "+t.tablet.bottom+t["desktop-unit"]+";} ")+"} @media (max-width: "+a+"px) {")+o+" {margin-left: "+t.mobile.left+t["mobile-unit"]+";")+"margin-right: "+t.mobile.right+t["mobile-unit"]+";")+"margin-top: "+t.mobile.top+t["desktop-unit"]+";")+"margin-bottom: "+t.mobile.bottom+t["desktop-unit"]+";} } ",astra_add_dynamic_css("section-footer-menu-margin",e))})}),astra_builder_visibility_css("section-footer-menu",'.footer-widget-area[data-section="section-footer-menu"]',"block")})(jQuery); footer-sml-layout-2.php 0000644 00000003412 15110607427 0011021 0 ustar 00 <?php /** * Template for Small Footer Layout 2 * * @package Astra * @link https://wpastra.com/ * @since Astra 1.0.0 */ $astra_footer_section_1 = astra_get_small_footer( 'footer-sml-section-1' ); $astra_footer_section_2 = astra_get_small_footer( 'footer-sml-section-2' ); $astra_footer_sections = 0; if ( '' != $astra_footer_section_1 ) { $astra_footer_sections++; } if ( '' != $astra_footer_section_2 ) { $astra_footer_sections++; } switch ( $astra_footer_sections ) { case '2': $astra_footer_section_class = 'ast-small-footer-section-equally ' . astra_attr( 'ast-grid-col-6' ); break; case '1': default: $astra_footer_section_class = 'ast-small-footer-section-equally ' . astra_attr( 'ast-grid-common-col' ); break; } ?> <div class="ast-small-footer footer-sml-layout-2"> <div class="ast-footer-overlay"> <div class="ast-container"> <div class="ast-small-footer-wrap" > <div class="ast-row ast-flex"> <?php if ( $astra_footer_section_1 ) { ?> <div class="ast-small-footer-section ast-small-footer-section-1 <?php echo esc_attr( $astra_footer_section_class ); ?>" > <?php echo $astra_footer_section_1; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </div> <?php } ?> <?php if ( $astra_footer_section_2 ) { ?> <div class="ast-small-footer-section ast-small-footer-section-2 <?php echo esc_attr( $astra_footer_section_class ); ?>" > <?php echo $astra_footer_section_2; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </div> <?php } ?> </div> <!-- .ast-row.ast-flex --> </div><!-- .ast-small-footer-wrap --> </div><!-- .ast-container --> </div><!-- .ast-footer-overlay --> </div><!-- .ast-small-footer-->
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings