From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- .../assets/js/minified/customizer-preview.min.js | 1 + .../assets/js/unminified/customizer-preview.js | 15 +++++ .../class-astra-footer-widget-component-loader.php | 64 ++++++++++++++++++ .../widget/class-astra-footer-widget-component.php | 45 +++++++++++++ .../type/footer/widget/dynamic-css/dynamic.css.php | 78 ++++++++++++++++++++++ 5 files changed, 203 insertions(+) create mode 100644 inc/builder/type/footer/widget/assets/js/minified/customizer-preview.min.js create mode 100644 inc/builder/type/footer/widget/assets/js/unminified/customizer-preview.js create mode 100644 inc/builder/type/footer/widget/class-astra-footer-widget-component-loader.php create mode 100644 inc/builder/type/footer/widget/class-astra-footer-widget-component.php create mode 100644 inc/builder/type/footer/widget/dynamic-css/dynamic.css.php (limited to 'inc/builder/type/footer/widget') diff --git a/inc/builder/type/footer/widget/assets/js/minified/customizer-preview.min.js b/inc/builder/type/footer/widget/assets/js/minified/customizer-preview.min.js new file mode 100644 index 0000000..febe5a6 --- /dev/null +++ b/inc/builder/type/footer/widget/assets/js/minified/customizer-preview.min.js @@ -0,0 +1 @@ +jQuery,astra_builder_widget_css("footer"); \ No newline at end of file diff --git a/inc/builder/type/footer/widget/assets/js/unminified/customizer-preview.js b/inc/builder/type/footer/widget/assets/js/unminified/customizer-preview.js new file mode 100644 index 0000000..ce30144 --- /dev/null +++ b/inc/builder/type/footer/widget/assets/js/unminified/customizer-preview.js @@ -0,0 +1,15 @@ +/** + * 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 ); diff --git a/inc/builder/type/footer/widget/class-astra-footer-widget-component-loader.php b/inc/builder/type/footer/widget/class-astra-footer-widget-component-loader.php new file mode 100644 index 0000000..d08f616 --- /dev/null +++ b/inc/builder/type/footer/widget/class-astra-footer-widget-component-loader.php @@ -0,0 +1,64 @@ + 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(); diff --git a/inc/builder/type/footer/widget/class-astra-footer-widget-component.php b/inc/builder/type/footer/widget/class-astra-footer-widget-component.php new file mode 100644 index 0000000..e1bf09d --- /dev/null +++ b/inc/builder/type/footer/widget/class-astra-footer-widget-component.php @@ -0,0 +1,45 @@ + 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; + + $dynamic_css .= Astra_Widget_Component_Dynamic_CSS::astra_widget_dynamic_css( 'footer' ); + } + + return $dynamic_css; +} -- cgit v1.2.3-60-g2f50