File manager - Edit - /home/aresglob/public_html/wp/wp-includes/images/smilies/builder.zip
Back
PK Wjm[�ؿ�� � class-astra-builder-loader.phpnu �[��� <?php /** * Astra Builder Loader. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Builder_Loader' ) ) { /** * Class Astra_Builder_Loader. */ final class Astra_Builder_Loader { /** * Member Variable * * @var mixed instance */ private static $instance = null; /** * Variable to hold menu locations rendered on the site. * * @var array Menu locations array */ private static $menu_locations = array(); /** * Initiator */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); do_action( 'astra_builder_loaded' ); } return self::$instance; } /** * Constructor */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound /** * Builder Core Files. */ require_once ASTRA_THEME_DIR . 'inc/core/builder/class-astra-builder-helper.php'; require_once ASTRA_THEME_DIR . 'inc/core/builder/class-astra-builder-options.php'; /** * Builder - Header & Footer Markup. */ require_once ASTRA_THEME_DIR . 'inc/builder/markup/class-astra-builder-header.php'; require_once ASTRA_THEME_DIR . 'inc/builder/markup/class-astra-builder-footer.php'; /** * Builder Controllers. */ require_once ASTRA_THEME_DIR . 'inc/builder/controllers/class-astra-builder-widget-controller.php'; require_once ASTRA_THEME_DIR . 'inc/builder/controllers/class-astra-builder-ui-controller.php'; /** * Customizer - Configs. */ require_once ASTRA_THEME_DIR . 'inc/customizer/class-astra-builder-customizer.php'; /*DONE */ if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { add_filter( 'astra_existing_header_footer_configs', '__return_false' ); add_filter( 'astra_addon_existing_header_footer_configs', '__return_false' ); } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound add_action( 'wp', array( $this, 'load_markup' ), 100 ); add_filter( 'astra_quick_settings', array( $this, 'quick_settings' ) ); } /** * Update Quick Settings links. * * @param array $quick_settings Links to the Quick Settings in Astra. * @since 3.0.0 */ public function quick_settings( $quick_settings ) { if ( false === Astra_Builder_Helper::$is_header_footer_builder_active ) { return $quick_settings; } $quick_settings['header']['title'] = __( 'Header Builder', 'astra' ); $quick_settings['header']['quick_url'] = admin_url( 'customize.php?autofocus[panel]=panel-header-builder-group' ); $quick_settings['footer']['title'] = __( 'Footer Builder', 'astra' ); $quick_settings['footer']['quick_url'] = admin_url( 'customize.php?autofocus[panel]=panel-footer-builder-group' ); return $quick_settings; } /** * Advanced Hooks markup loader * * Loads appropriate template file based on the style option selected in options panel. * * @since 3.0.0 */ public function load_markup() { if ( ! defined( 'ASTRA_ADVANCED_HOOKS_POST_TYPE' ) || false === Astra_Builder_Helper::$is_header_footer_builder_active ) { return; } $option = array( 'location' => 'ast-advanced-hook-location', 'exclusion' => 'ast-advanced-hook-exclusion', 'users' => 'ast-advanced-hook-users', ); $result = Astra_Target_Rules_Fields::get_instance()->get_posts_by_conditions( ASTRA_ADVANCED_HOOKS_POST_TYPE, $option ); $header_counter = 0; $footer_counter = 0; $layout_404_counter = 0; foreach ( $result as $post_id => $post_data ) { $post_type = get_post_type(); // Get the display devices condition for the post. $display_devices = get_post_meta( $post_id, 'ast-advanced-display-device', true ); if ( ! is_array( $display_devices ) ) { $display_devices = array( 'desktop', 'tablet', 'mobile' ); } if ( ASTRA_ADVANCED_HOOKS_POST_TYPE !== $post_type ) { $layout = get_post_meta( $post_id, 'ast-advanced-hook-layout', false ); if ( isset( $layout[0] ) && '404-page' === $layout[0] && 0 === $layout_404_counter ) { $layout_404_settings = get_post_meta( $post_id, 'ast-404-page', true ); if ( isset( $layout_404_settings['disable_header'] ) && 'enabled' === $layout_404_settings['disable_header'] ) { remove_action( 'astra_header', array( Astra_Builder_Header::get_instance(), 'header_builder_markup' ) ); } if ( isset( $layout_404_settings['disable_footer'] ) && 'enabled' === $layout_404_settings['disable_footer'] ) { remove_action( 'astra_footer', array( Astra_Builder_Footer::get_instance(), 'footer_markup' ) ); } $layout_404_counter++; } elseif ( isset( $layout[0] ) && 'header' === $layout[0] && 0 === $header_counter ) { // Remove default site's header. remove_action( 'astra_header', array( Astra_Builder_Header::get_instance(), 'header_builder_markup' ) ); // Check if the post has 'ast-advanced-hook-enabled' meta key is not set to 'no'. $is_enabled = 'no' !== get_post_meta( $post_id, 'ast-advanced-hook-enabled', true ); // Check if the custom header is enabled for all devices. $is_all_devices = 3 === count( $display_devices ); if ( $is_enabled && $is_all_devices ) { // Prevent Off-Canvas markup on custom header rendering. add_filter( 'astra_disable_mobile_popup_markup', '__return_true' ); } $header_counter++; } elseif ( isset( $layout[0] ) && 'footer' === $layout[0] && 0 === $footer_counter ) { // Remove default site's footer. remove_action( 'astra_footer', array( Astra_Builder_Footer::get_instance(), 'footer_markup' ) ); $footer_counter++; } } } } /** * Method to add rel="nofollow" for markup * * @param string $theme_location Theme location for key. * @param string $markup Markup. * @return string Menu markup with rel="nofollow". * @since 4.6.14 */ public function nofollow_markup( $theme_location, $markup ) { $nofollow_disabled = apply_filters( 'astra_disable_nofollow_markup', true ); if ( $nofollow_disabled ) { return $markup; } if ( isset( self::$menu_locations[ $theme_location ] ) ) { $markup = str_replace( 'href="', 'rel="nofollow" href="', $markup ); } else { self::$menu_locations[ $theme_location ] = true; } return $markup; } } /** * Prepare if class 'Astra_Builder_Loader' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Builder_Loader::get_instance(); } if ( ! function_exists( 'astra_builder' ) ) { /** * Get global class. * * @return object */ function astra_builder() { return Astra_Builder_Loader::get_instance(); } } PK Wjm[�3��� � % markup/class-astra-builder-footer.phpnu �[��� <?php /** * Astra Builder Loader. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Builder_Footer' ) ) { /** * Class Astra_Builder_Footer. */ final class Astra_Builder_Footer { /** * Member Variable * * @var mixed instance */ private static $instance = null; /** * Dynamic Methods. * * @var array dynamic methods */ private static $methods = array(); /** * Initiator */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { $this->remove_existing_actions(); // Footer Builder. add_action( 'astra_footer', array( $this, 'footer_markup' ), 10 ); add_action( 'astra_above_footer', array( $this, 'above_footer' ), 10 ); add_action( 'astra_primary_footer', array( $this, 'primary_footer' ), 10 ); add_action( 'astra_below_footer', array( $this, 'below_footer' ), 10 ); add_action( 'astra_render_footer_column', array( $this, 'render_column' ), 10, 2 ); // Core Components. add_action( 'astra_footer_copyright', array( $this, 'footer_copyright' ), 10 ); for ( $index = 1; $index <= Astra_Builder_Helper::$component_limit; $index++ ) { // Buttons. add_action( 'astra_footer_button_' . $index, array( $this, 'button_' . $index ) ); self::$methods[] = 'button_' . $index; // Htmls. add_action( 'astra_footer_html_' . $index, array( $this, 'footer_html_' . $index ) ); self::$methods[] = 'footer_html_' . $index; // Social Icons. add_action( 'astra_footer_social_' . $index, array( $this, 'footer_social_' . $index ) ); self::$methods[] = 'footer_social_' . $index; } // Navigation menu. add_action( 'astra_footer_menu', array( $this, 'footer_menu' ) ); } } /** * Callback when method not exists. * * @param string $func function name. * @param array $params function parameters. */ public function __call( $func, $params ) { if ( in_array( $func, self::$methods, true ) ) { if ( 0 === strpos( $func, 'footer_html_' ) ) { Astra_Builder_UI_Controller::render_html_markup( str_replace( '_', '-', $func ) ); } elseif ( 0 === strpos( $func, 'button_' ) ) { $index = (int) substr( $func, strrpos( $func, '_' ) + 1 ); if ( $index ) { Astra_Builder_UI_Controller::render_button( $index, 'footer' ); } } elseif ( 0 === strpos( $func, 'footer_social_' ) ) { $index = (int) substr( $func, strrpos( $func, '_' ) + 1 ); if ( $index ) { Astra_Builder_UI_Controller::render_social_icon( $index, 'footer' ); } } } } /** * Remove existing Footer to load Footer Builder. * * @since 3.0.0 * @return void */ public function remove_existing_actions() { remove_action( 'astra_footer_content_top', 'astra_footer_content_top' ); remove_action( 'astra_footer_content', 'astra_advanced_footer_markup', 1 ); remove_action( 'astra_footer_content', 'astra_footer_small_footer_template', 5 ); remove_action( 'astra_footer_content_bottom', 'astra_footer_content_bottom' ); remove_action( 'astra_footer', 'astra_footer_markup' ); } /** * Astra Footer Markup. */ public function footer_markup() { /** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $display_footer = get_post_meta( astra_get_post_id(), 'footer-sml-layout', true ); $display_footer = apply_filters( 'astra_footer_bar_display', $display_footer ); if ( 'disabled' !== $display_footer ) { get_template_part( 'template-parts/footer/builder/desktop-builder-layout' ); } } /** * Call above footer UI. */ public function above_footer() { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/footer/builder/footer', 'row', array( 'row' => 'above', ) ); } else { set_query_var( 'row', 'above' ); get_template_part( 'template-parts/footer/builder/footer', 'row' ); } } /** * Call primary footer UI. */ public function primary_footer() { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/footer/builder/footer', 'row', array( 'row' => 'primary', ) ); } else { set_query_var( 'row', 'primary' ); get_template_part( 'template-parts/footer/builder/footer', 'row' ); } } /** * Call below footer UI. */ public function below_footer() { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/footer/builder/footer', 'row', array( 'row' => 'below', ) ); } else { set_query_var( 'row', 'below' ); get_template_part( 'template-parts/footer/builder/footer', 'row' ); } } /** * Call component footer UI. * * @param string $row row. * @param string $column column. */ public function render_column( $row, $column ) { Astra_Builder_Helper::render_builder_markup( $row, $column, 'desktop', 'footer' ); } /** * Render Footer Copyright Markup! */ public function footer_copyright() { $theme_author = astra_get_theme_author_details(); $content = astra_get_i18n_option( 'footer-copyright-editor', _x( '%astra%', 'Footer Builder: Copyright Editor Text', 'astra' ) ); if ( $content || is_customize_preview() ) { echo '<div class="ast-footer-copyright">'; $content = str_replace( '[copyright]', '©', $content ); $content = str_replace( '[current_year]', gmdate( 'Y' ), $content ); $content = str_replace( '[site_title]', get_bloginfo( 'name' ), $content ); $content = str_replace( '[theme_author]', '<a href="' . esc_url( $theme_author['theme_author_url'] ) . '" rel="nofollow noopener" target="_blank">' . $theme_author['theme_name'] . '</a>', $content ); echo do_shortcode( wp_kses_post( wpautop( $content ) ) ); echo '</div>'; } } /** * Render HTML 1. */ public function footer_html_1() { Astra_Builder_UI_Controller::render_html_markup( 'footer-html-1' ); } /** * Render HTML 2. */ public function footer_html_2() { Astra_Builder_UI_Controller::render_html_markup( 'footer-html-2' ); } /** * Render HTML 3. */ public function footer_html_3() { Astra_Builder_UI_Controller::render_html_markup( 'footer-html-3' ); } /** * Render HTML 4. */ public function footer_html_4() { Astra_Builder_UI_Controller::render_html_markup( 'footer-html-4' ); } /** * Render Menu. */ public function footer_menu() { Astra_Footer_Menu_Component::menu_markup(); } } /** * Prepare if class 'Astra_Builder_Footer' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Builder_Footer::get_instance(); } PK Wjm[�����8 �8 % markup/class-astra-builder-header.phpnu �[��� <?php /** * Astra Builder Loader. * * @package astra-builder */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Astra_Builder_Header' ) ) { /** * Class Astra_Builder_Header. */ final class Astra_Builder_Header { /** * Member Variable * * @var mixed instance */ private static $instance = null; /** * Dynamic Methods. * * @var array dynamic methods */ private static $methods = array(); /** * Initiator * * @return object initialized Astra_Builder_Header class */ public static function get_instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Constructor */ public function __construct() { add_action( 'astra_header', array( $this, 'global_astra_header' ), 0 ); if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { $this->remove_existing_actions(); add_action( 'body_class', array( $this, 'add_body_class' ) ); // Header Desktop Builder. add_action( 'astra_masthead', array( $this, 'desktop_header' ) ); add_action( 'astra_above_header', array( $this, 'above_header' ) ); add_action( 'astra_primary_header', array( $this, 'primary_header' ) ); add_action( 'astra_below_header', array( $this, 'below_header' ) ); add_action( 'astra_render_header_column', array( $this, 'render_column' ), 10, 2 ); // Mobile Builder. add_action( 'astra_mobile_header', array( $this, 'mobile_header' ) ); add_action( 'astra_mobile_above_header', array( $this, 'mobile_above_header' ) ); add_action( 'astra_mobile_primary_header', array( $this, 'mobile_primary_header' ) ); add_action( 'astra_mobile_below_header', array( $this, 'mobile_below_header' ) ); add_action( 'astra_render_mobile_header_column', array( $this, 'render_mobile_column' ), 10, 2 ); // Load Off-Canvas Markup on Footer. add_action( 'astra_footer', array( $this, 'mobile_popup' ) ); add_action( 'astra_mobile_header_content', array( $this, 'render_mobile_column' ), 10, 2 ); add_action( 'astra_render_mobile_popup', array( $this, 'render_mobile_column' ), 10, 2 ); for ( $index = 1; $index <= Astra_Builder_Helper::$component_limit; $index++ ) { // Buttons. add_action( 'astra_header_button_' . $index, array( $this, 'button_' . $index ) ); self::$methods[] = 'button_' . $index; // Htmls. add_action( 'astra_header_html_' . $index, array( $this, 'header_html_' . $index ) ); self::$methods[] = 'header_html_' . $index; // Social Icons. add_action( 'astra_header_social_' . $index, array( $this, 'header_social_' . $index ) ); self::$methods[] = 'header_social_' . $index; // Menus. add_action( 'astra_header_menu_' . $index, array( $this, 'menu_' . $index ) ); self::$methods[] = 'menu_' . $index; } add_action( 'astra_mobile_site_identity', self::class . '::site_identity' ); add_action( 'astra_header_search', array( $this, 'header_search' ), 10, 1 ); add_action( 'astra_header_woo_cart', array( $this, 'header_woo_cart' ), 10, 1 ); add_action( 'astra_header_edd_cart', array( $this, 'header_edd_cart' ) ); add_action( 'astra_header_account', array( $this, 'header_account' ) ); add_action( 'astra_header_mobile_trigger', array( $this, 'header_mobile_trigger' ) ); // Load Cart Flyout Markup on Footer. add_action( 'astra_footer', array( $this, 'mobile_cart_flyout' ) ); add_action( 'astra_header_menu_mobile', array( $this, 'header_mobile_menu_markup' ) ); } add_action( 'astra_site_identity', self::class . '::site_identity' ); } /** * Callback when method not exists. * * @param string $func function name. * @param array $params function parameters. */ public function __call( $func, $params ) { if ( in_array( $func, self::$methods, true ) ) { if ( 0 === strpos( $func, 'header_html_' ) ) { Astra_Builder_UI_Controller::render_html_markup( str_replace( '_', '-', $func ) ); } elseif ( 0 === strpos( $func, 'button_' ) ) { $index = (int) substr( $func, strrpos( $func, '_' ) + 1 ); if ( $index ) { Astra_Builder_UI_Controller::render_button( $index, 'header' ); } } elseif ( 0 === strpos( $func, 'menu_' ) ) { $index = (int) substr( $func, strrpos( $func, '_' ) + 1 ); if ( $index ) { Astra_Header_Menu_Component::menu_markup( $index, $params['0'] ); } } elseif ( 0 === strpos( $func, 'header_social_' ) ) { $index = (int) substr( $func, strrpos( $func, '_' ) + 1 ); if ( $index ) { Astra_Builder_UI_Controller::render_social_icon( $index, 'header' ); } } } } /** * Remove complete header Support on basis of meta option. * * @since 3.8.0 * @return void */ public function global_astra_header() { $display = get_post_meta( absint( astra_get_post_id() ), 'ast-global-header-display', true ); $display = apply_filters( 'astra_header_display', $display ); if ( 'disabled' === $display ) { remove_action( 'astra_header', 'astra_header_markup' ); /** @psalm-suppress DocblockTypeContradiction */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort if ( true === Astra_Builder_Helper::$is_header_footer_builder_active ) { // phpcs:ignore PHPCompatibility.Keywords.NewKeywords.t_namespaceFound, PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound remove_action( 'astra_header', array( $this, 'header_builder_markup' ) ); // phpcs:ignore PHPCompatibility.Keywords.NewKeywords.t_namespaceFound, PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound } } } /** * Inherit Header base layout. * Do all actions for header. */ public function header_builder_markup() { do_action( 'astra_header' ); } /** * Remove existing Header to load Header Builder. * * @since 3.0.0 * @return void */ public function remove_existing_actions() { remove_action( 'astra_masthead', 'astra_masthead_primary_template' ); remove_action( 'astra_masthead_content', 'astra_primary_navigation_markup', 10 ); remove_filter( 'wp_page_menu_args', 'astra_masthead_custom_page_menu_items', 10, 2 ); remove_filter( 'wp_nav_menu_items', 'astra_masthead_custom_nav_menu_items' ); } /** * Header Mobile trigger */ public function header_mobile_trigger() { Astra_Builder_UI_Controller::render_mobile_trigger(); } /** * Render WooCommerce Cart. * * @param string $device Either 'mobile' or 'desktop' option. */ public function header_woo_cart( $device = 'desktop' ) { if ( class_exists( 'Astra_Woocommerce' ) ) { echo Astra_Woocommerce::get_instance()->woo_mini_cart_markup( $device ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Render EDD Cart. */ public function header_edd_cart() { if ( class_exists( 'Easy_Digital_Downloads' ) ) { echo Astra_Edd::get_instance()->edd_mini_cart_markup(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Render account icon. */ public function header_account() { Astra_Builder_UI_Controller::render_account(); } /** * Render Search icon. * * @param string $device Device name. */ public function header_search( $device = 'desktop' ) { echo astra_get_search( '', $device ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Render site logo. * * @param string $device Device name. */ public static function site_identity( $device = 'desktop' ) { Astra_Builder_UI_Controller::render_site_identity( $device ); } /** * Call component header UI. * * @param string $row row. * @param string $column column. */ public function render_column( $row, $column ) { Astra_Builder_Helper::render_builder_markup( $row, $column, 'desktop', 'header' ); } /** * Render desktop header layout. */ public function desktop_header() { get_template_part( 'template-parts/header/builder/desktop-builder-layout' ); } /** * Call above header UI. */ public function above_header() { $display = is_singular() ? get_post_meta( get_the_ID(), 'ast-hfb-above-header-display', true ) : true; $display = apply_filters( 'astra_above_header_display', $display ); if ( 'disabled' !== $display ) { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/header/builder/header', 'row', array( 'row' => 'above', ) ); } else { set_query_var( 'row', 'above' ); get_template_part( 'template-parts/header/builder/header', 'row' ); } } } /** * Call primary header UI. */ public function primary_header() { $display = is_singular() ? get_post_meta( get_the_ID(), 'ast-main-header-display', true ) : true; $display = apply_filters( 'astra_main_header_display', $display ); if ( 'disabled' !== $display ) { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/header/builder/header', 'row', array( 'row' => 'primary', ) ); } else { set_query_var( 'row', 'primary' ); get_template_part( 'template-parts/header/builder/header', 'row' ); } } } /** * Call below header UI. */ public function below_header() { $display = is_singular() ? get_post_meta( get_the_ID(), 'ast-hfb-below-header-display', true ) : true; $display = apply_filters( 'astra_below_header_display', $display ); if ( 'disabled' !== $display ) { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/header/builder/header', 'row', array( 'row' => 'below', ) ); } else { set_query_var( 'row', 'below' ); get_template_part( 'template-parts/header/builder/header', 'row' ); } } } /** * Call mobile component header UI. * * @param string $row row. * @param string $column column. */ public function render_mobile_column( $row, $column ) { Astra_Builder_Helper::render_builder_markup( $row, $column, 'mobile', 'header' ); } /** * Render Mobile header layout. */ public function mobile_header() { get_template_part( 'template-parts/header/builder/mobile-builder-layout' ); } /** * Call Mobile above header UI. */ public function mobile_above_header() { $display = is_singular() ? get_post_meta( get_the_ID(), 'ast-hfb-mobile-header-display', true ) : true; $display = apply_filters( 'astra_above_mobile_header_display', $display ); if ( 'disabled' !== $display ) { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/header/builder/mobile-header', 'row', array( 'row' => 'above', ) ); } else { set_query_var( 'row', 'above' ); get_template_part( 'template-parts/header/builder/mobile-header', 'row' ); } } } /** * Call Mobile primary header UI. */ public function mobile_primary_header() { $display = is_singular() ? get_post_meta( get_the_ID(), 'ast-hfb-mobile-header-display', true ) : true; $display = apply_filters( 'astra_primary_mobile_header_display', $display ); if ( 'disabled' !== $display ) { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/header/builder/mobile-header', 'row', array( 'row' => 'primary', ) ); } else { set_query_var( 'row', 'primary' ); get_template_part( 'template-parts/header/builder/mobile-header', 'row' ); } } } /** * Call Mobile below header UI. */ public function mobile_below_header() { $display = is_singular() ? get_post_meta( absint( astra_get_post_id() ), 'ast-hfb-mobile-header-display', true ) : true; $display = apply_filters( 'astra_below_mobile_header_display', $display ); if ( 'disabled' !== $display ) { if ( astra_wp_version_compare( '5.4.99', '>=' ) ) { get_template_part( 'template-parts/header/builder/mobile-header', 'row', array( 'row' => 'below', ) ); } else { set_query_var( 'row', 'below' ); get_template_part( 'template-parts/header/builder/mobile-header', 'row' ); } } } /** * Call Mobile Popup UI. */ public function mobile_popup() { if ( apply_filters( 'astra_disable_mobile_popup_markup', false ) ) { return; } $mobile_header_type = astra_get_option( 'mobile-header-type' ); if ( 'off-canvas' === $mobile_header_type || 'full-width' === $mobile_header_type || is_customize_preview() ) { Astra_Builder_Helper::render_mobile_popup_markup(); } } /** * Call Mobile Menu Markup. * * @param string $device Checking where mobile-menu is dropped. */ public function header_mobile_menu_markup( $device = '' ) { Astra_Mobile_Menu_Component::menu_markup( $device ); } /** * Call Mobile Cart Flyout UI. */ public function mobile_cart_flyout() { // Get the responsive cart click action setting. $responsive_cart_action = astra_get_option( 'responsive-cart-click-action' ); $desktop_cart_action = astra_get_option( 'woo-header-cart-click-action' ); // Hide cart flyout only if current page is checkout/cart or if redirect option is selected. if ( ( Astra_Builder_Helper::is_component_loaded( 'woo-cart', 'header' ) && class_exists( 'WooCommerce' ) && ! is_cart() && ! is_checkout() && ( 'redirect' !== $responsive_cart_action || // Prevent flyout markup when 'redirect' option is selected. 'redirect' !== $desktop_cart_action ) ) || Astra_Builder_Helper::is_component_loaded( 'edd-cart', 'header' ) ) { Astra_Builder_UI_Controller::render_mobile_cart_flyout_markup(); } } /** * Add Body Classes * * @param array $classes Body Class Array. * @return array */ public function add_body_class( $classes ) { $classes[] = 'ast-hfb-header'; if ( defined( 'ASTRA_EXT_VER' ) && version_compare( ASTRA_EXT_VER, '3.2.0', '<' ) ) { $classes[] = 'astra-hfb-header'; } return $classes; } } /** * Prepare if class 'Astra_Builder_Header' exist. * Kicking this off by calling 'get_instance()' method */ Astra_Builder_Header::get_instance(); } PK Wjm[S�l˺X �X I type/base/dynamic-css/social/class-astra-social-component-dynamic-css.phpnu �[��� <?php /** * Astra Social Component Dynamic CSS. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Dynamic CSS. * * @since 3.0.0 */ class Astra_Social_Component_Dynamic_CSS { /** * Dynamic CSS * * @param string $builder_type Builder Type. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ public static function astra_social_dynamic_css( $builder_type = 'header' ) { $generated_css = ''; $social_css_flag = false; $number_of_social_icons = 'header' === $builder_type ? Astra_Builder_Helper::$num_of_header_social_icons : Astra_Builder_Helper::$num_of_footer_social_icons; for ( $index = 1; $index <= $number_of_social_icons; $index++ ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'social-icons-' . $index, $builder_type ) ) { continue; } $social_css_flag = true; $selector = '.ast-' . $builder_type . '-social-' . $index . '-wrap'; $_section = 'header' === $builder_type ? 'section-hb-social-icons-' . $index : 'section-fb-social-icons-' . $index; $icon_spacing = astra_get_option( $builder_type . '-social-' . $index . '-space' ); $icon_bg_spacing = astra_get_option( $builder_type . '-social-' . $index . '-bg-space' ); $icon_size = astra_get_option( $builder_type . '-social-' . $index . '-size' ); $icon_radius_fields = astra_get_option( $builder_type . '-social-' . $index . '-radius-fields' ); $icon_spacing_desktop = isset( $icon_spacing['desktop'] ) && '' !== $icon_spacing['desktop'] ? (int) $icon_spacing['desktop'] / 2 : ''; $icon_spacing_tablet = isset( $icon_spacing['tablet'] ) && '' !== $icon_spacing['tablet'] ? (int) $icon_spacing['tablet'] / 2 : ''; $icon_spacing_mobile = isset( $icon_spacing['mobile'] ) && '' !== $icon_spacing['mobile'] ? (int) $icon_spacing['mobile'] / 2 : ''; $icon_size_desktop = isset( $icon_size['desktop'] ) && '' !== $icon_size['desktop'] ? (int) $icon_size['desktop'] : ''; $icon_size_tablet = isset( $icon_size['tablet'] ) && '' !== $icon_size['tablet'] ? (int) $icon_size['tablet'] : ''; $icon_size_mobile = isset( $icon_size['mobile'] ) && '' !== $icon_size['mobile'] ? (int) $icon_size['mobile'] : ''; $icon_bg_spacing = isset( $icon_bg_spacing ) && '' !== $icon_bg_spacing ? (int) $icon_bg_spacing : ''; // Normal Responsive Colors. $color_type = astra_get_option( $builder_type . '-social-' . $index . '-color-type' ); $toggle_brand_hover = astra_get_option( $builder_type . '-social-' . $index . '-brand-hover-toggle' ); $social_icons_brand_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-brand-color' ), 'desktop' ); $social_icons_brand_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-brand-color' ), 'tablet' ); $social_icons_brand_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-brand-color' ), 'mobile' ); $social_label_brand_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-brand-label-color' ), 'desktop' ); $social_label_icons_brand_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-brand-label-color' ), 'tablet' ); $social_label_icons_brand_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-brand-label-color' ), 'mobile' ); $social_icons_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-color' ), 'desktop' ); $social_icons_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-color' ), 'tablet' ); $social_icons_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-color' ), 'mobile' ); // Hover Responsive Colors. $social_icons_h_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-h-color' ), 'desktop' ); $social_icons_h_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-h-color' ), 'tablet' ); $social_icons_h_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-h-color' ), 'mobile' ); // Normal Responsive Bg Colors. $social_icons_bg_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-bg-color' ), 'desktop' ); $social_icons_bg_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-bg-color' ), 'tablet' ); $social_icons_bg_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-bg-color' ), 'mobile' ); // Hover Responsive Bg Colors. $social_icons_h_bg_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-bg-h-color' ), 'desktop' ); $social_icons_h_bg_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-bg-h-color' ), 'tablet' ); $social_icons_h_bg_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-bg-h-color' ), 'mobile' ); // Normal Responsive Label Colors. $social_icons_label_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-label-color' ), 'desktop' ); $social_icons_label_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-label-color' ), 'tablet' ); $social_icons_label_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-label-color' ), 'mobile' ); // Hover Responsive Label Colors. $social_icons_label_h_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-label-h-color' ), 'desktop' ); $social_icons_label_h_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-label-h-color' ), 'tablet' ); $social_icons_label_h_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-social-' . $index . '-label-h-color' ), 'mobile' ); $margin = astra_get_option( $_section . '-margin' ); /** * Social Icon CSS. */ $css_output_desktop = array( $selector . ' .ast-builder-social-element,' . $selector . ' .social-show-label-true .ast-builder-social-element' => array( // Icon Spacing. 'margin-left' => astra_get_css_value( $icon_spacing_desktop, 'px' ), 'margin-right' => astra_get_css_value( $icon_spacing_desktop, 'px' ), // Icon Background Space. 'padding' => astra_get_css_value( $icon_bg_spacing, 'px' ), // Icon Radius. 'border-top-left-radius' => astra_responsive_spacing( $icon_radius_fields, 'top', 'desktop' ), 'border-top-right-radius' => astra_responsive_spacing( $icon_radius_fields, 'right', 'desktop' ), 'border-bottom-right-radius' => astra_responsive_spacing( $icon_radius_fields, 'bottom', 'desktop' ), 'border-bottom-left-radius' => astra_responsive_spacing( $icon_radius_fields, 'left', 'desktop' ), ), $selector . ' .ast-builder-social-element svg' => array( // Icon Size. 'width' => astra_get_css_value( $icon_size_desktop, 'px' ), 'height' => astra_get_css_value( $icon_size_desktop, 'px' ), ), $selector . ' .ast-social-icon-image-wrap' => array( // Icon Background Space. 'margin' => astra_get_css_value( $icon_bg_spacing, 'px' ), ), $selector => 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' ), ), ); if ( 'custom' === $color_type || is_customize_preview() ) { $css_output_desktop[ $selector . ' .ast-social-color-type-custom svg' ]['fill'] = $social_icons_color_desktop; $css_output_desktop[ $selector . ' .ast-builder-social-element' ]['background'] = $social_icons_bg_color_desktop; $css_output_desktop[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element:hover' ] = array( // Hover. 'color' => $social_icons_h_color_desktop, 'background' => $social_icons_h_bg_color_desktop, ); $css_output_desktop[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element:hover svg' ] = array( 'fill' => $social_icons_h_color_desktop, ); if ( isset( $social_icons_label_color_desktop ) && ! empty( $social_icons_label_color_desktop ) ) { $css_output_desktop[ $selector . ' .ast-social-color-type-custom .social-item-label' ]['color'] = $social_icons_label_color_desktop; } else { $css_output_desktop[ $selector . ' .ast-social-color-type-custom .social-item-label' ]['color'] = $social_icons_color_desktop; } if ( isset( $social_icons_label_h_color_desktop ) && ! empty( $social_icons_label_h_color_desktop ) ) { $css_output_desktop[ $selector . ' .ast-builder-social-element:hover .social-item-label' ]['color'] = $social_icons_label_h_color_desktop; } else { $css_output_desktop[ $selector . ' .ast-builder-social-element:hover .social-item-label' ]['color'] = $social_icons_h_color_desktop; } } if ( 'official' === $color_type && false === $toggle_brand_hover ) { $css_output_desktop['.ast-social-color-type-official .ast-builder-social-element, .ast-social-color-type-official .social-item-label'] = array( 'color' => 'var(--color)', 'background-color' => 'var(--background-color)', ); $css_output_desktop['.header-social-inner-wrap.ast-social-color-type-official .ast-builder-social-element svg, .footer-social-inner-wrap.ast-social-color-type-official .ast-builder-social-element svg'] = array( 'fill' => 'currentColor', ); } if ( 'official' === $color_type && true === $toggle_brand_hover ) { $css_output_desktop['.ast-social-color-type-official .ast-builder-social-element:hover, .ast-social-color-type-official .ast-builder-social-element:hover .social-item-label'] = array( 'color' => 'var(--color)', 'background-color' => 'var(--background-color)', ); $css_output_desktop['.header-social-inner-wrap.ast-social-color-type-official .ast-builder-social-element:hover svg, .footer-social-inner-wrap.ast-social-color-type-official .ast-builder-social-element:hover svg'] = array( 'fill' => 'currentColor', ); $css_output_desktop[ $selector . ' .ast-social-color-type-official .ast-builder-social-element svg' ]['fill'] = $social_icons_brand_color_desktop; if ( isset( $social_label_brand_color_desktop ) && ! empty( $social_label_brand_color_desktop ) ) { $css_output_desktop[ $selector . ' .ast-social-color-type-official .social-item-label' ]['color'] = $social_label_brand_color_desktop; } else { $css_output_desktop[ $selector . ' .ast-social-color-type-official .social-item-label' ]['color'] = $social_icons_brand_color_desktop; } } /** * Social_icons CSS. */ $css_output_tablet = array( $selector . ' .ast-builder-social-element svg' => array( // Icon Size. 'width' => astra_get_css_value( $icon_size_tablet, 'px' ), 'height' => astra_get_css_value( $icon_size_tablet, 'px' ), ), $selector . ' .ast-builder-social-element' => array( // Icon Spacing. 'margin-left' => astra_get_css_value( $icon_spacing_tablet, 'px' ), 'margin-right' => astra_get_css_value( $icon_spacing_tablet, 'px' ), // Border Radius. 'border-top-left-radius' => astra_responsive_spacing( $icon_radius_fields, 'top', 'tablet' ), 'border-top-right-radius' => astra_responsive_spacing( $icon_radius_fields, 'right', 'tablet' ), 'border-bottom-right-radius' => astra_responsive_spacing( $icon_radius_fields, 'bottom', 'tablet' ), 'border-bottom-left-radius' => astra_responsive_spacing( $icon_radius_fields, 'left', 'tablet' ), ), $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' ), ), ); if ( 'custom' === $color_type || is_customize_preview() ) { $css_output_tablet[ $selector . ' .ast-social-color-type-custom svg' ]['fill'] = $social_icons_color_tablet; $css_output_tablet[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element' ]['background'] = $social_icons_bg_color_tablet; $css_output_tablet[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element:hover' ] = array( // Hover. 'color' => $social_icons_h_color_tablet, 'background' => $social_icons_h_bg_color_tablet, ); $css_output_tablet[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element:hover svg' ] = array( 'fill' => $social_icons_h_color_tablet, ); if ( isset( $social_icons_label_color_tablet ) && ! empty( $social_icons_label_color_tablet ) ) { $css_output_tablet[ $selector . ' .ast-social-color-type-custom .social-item-label' ]['color'] = $social_icons_label_color_tablet; } else { $css_output_tablet[ $selector . ' .ast-social-color-type-custom .social-item-label' ]['color'] = $social_icons_color_tablet; } if ( isset( $social_icons_label_h_color_tablet ) && ! empty( $social_icons_label_h_color_tablet ) ) { $css_output_tablet[ $selector . ' .ast-builder-social-element:hover .social-item-label' ]['color'] = $social_icons_label_h_color_tablet; } else { $css_output_tablet[ $selector . ' .ast-builder-social-element:hover .social-item-label' ]['color'] = $social_icons_h_color_tablet; } } if ( 'official' === $color_type && true === $toggle_brand_hover ) { $css_output_tablet[ $selector . ' .ast-social-color-type-official svg' ]['fill'] = $social_icons_brand_color_tablet; if ( isset( $social_label_icons_brand_color_tablet ) && ! empty( $social_label_icons_brand_color_tablet ) ) { $css_output_tablet[ $selector . ' .ast-social-color-type-official .social-item-label' ]['color'] = $social_icons_label_color_tablet; } else { $css_output_tablet[ $selector . ' .ast-social-color-type-official .social-item-label' ]['color'] = $social_icons_brand_color_tablet; } } /** * Social_icons CSS. */ $css_output_mobile = array( $selector . ' .ast-builder-social-element svg' => array( // Icon Size. 'width' => astra_get_css_value( $icon_size_mobile, 'px' ), 'height' => astra_get_css_value( $icon_size_mobile, 'px' ), ), $selector . ' .ast-builder-social-element' => array( // Icon Spacing. 'margin-left' => astra_get_css_value( $icon_spacing_mobile, 'px' ), 'margin-right' => astra_get_css_value( $icon_spacing_mobile, 'px' ), // Border Radius. 'border-top-left-radius' => astra_responsive_spacing( $icon_radius_fields, 'top', 'mobile' ), 'border-top-right-radius' => astra_responsive_spacing( $icon_radius_fields, 'right', 'mobile' ), 'border-bottom-right-radius' => astra_responsive_spacing( $icon_radius_fields, 'bottom', 'mobile' ), 'border-bottom-left-radius' => astra_responsive_spacing( $icon_radius_fields, 'left', 'mobile' ), ), $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' ), ), ); if ( 'custom' === $color_type || is_customize_preview() ) { $css_output_mobile[ $selector . ' .ast-social-color-type-custom svg' ]['fill'] = $social_icons_color_mobile; $css_output_mobile[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element' ]['background'] = $social_icons_bg_color_mobile; $css_output_mobile[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element:hover' ] = array( // Hover. 'color' => $social_icons_h_color_mobile, 'background' => $social_icons_h_bg_color_mobile, ); $css_output_mobile[ $selector . ' .ast-social-color-type-custom .ast-builder-social-element:hover svg' ] = array( 'fill' => $social_icons_h_color_mobile, ); if ( isset( $social_icons_label_color_mobile ) && ! empty( $social_icons_label_color_mobile ) ) { $css_output_mobile[ $selector . ' .ast-social-color-type-custom .social-item-label' ]['color'] = $social_icons_label_color_mobile; } else { $css_output_mobile[ $selector . ' .ast-social-color-type-custom .social-item-label' ]['color'] = $social_icons_color_mobile; } if ( isset( $social_icons_label_h_color_mobile ) && ! empty( $social_icons_label_h_color_mobile ) ) { $css_output_mobile[ $selector . ' .ast-builder-social-element:hover .social-item-label' ]['color'] = $social_icons_label_h_color_mobile; } else { $css_output_mobile[ $selector . ' .ast-builder-social-element:hover .social-item-label' ]['color'] = $social_icons_h_color_mobile; } } if ( 'official' === $color_type && true === $toggle_brand_hover ) { $css_output_mobile[ $selector . ' .ast-social-color-type-official svg' ]['fill'] = $social_icons_brand_color_mobile; if ( isset( $social_label_icons_brand_color_mobile ) && ! empty( $social_label_icons_brand_color_mobile ) ) { $css_output_mobile[ $selector . ' .ast-social-color-type-official .social-item-label' ]['color'] = $social_label_icons_brand_color_mobile; } else { $css_output_mobile[ $selector . ' .ast-social-color-type-official .social-item-label' ]['color'] = $social_icons_brand_color_mobile; } } if ( 'footer' === $builder_type ) { // Footer Social Alignment CSS. $alignment = astra_get_option( 'footer-social-' . $index . '-alignment' ); $desktop_alignment = isset( $alignment['desktop'] ) ? $alignment['desktop'] : ''; $tablet_alignment = isset( $alignment['tablet'] ) ? $alignment['tablet'] : ''; $mobile_alignment = isset( $alignment['mobile'] ) ? $alignment['mobile'] : ''; $css_output_desktop[ '[data-section="section-fb-social-icons-' . $index . '"] .footer-social-inner-wrap' ] = array( 'text-align' => $desktop_alignment, ); $css_output_tablet[ '[data-section="section-fb-social-icons-' . $index . '"] .footer-social-inner-wrap' ] = array( 'text-align' => $tablet_alignment, ); $css_output_mobile[ '[data-section="section-fb-social-icons-' . $index . '"] .footer-social-inner-wrap' ] = 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() ); $css_output .= Astra_Builder_Base_Dynamic_CSS::prepare_advanced_typography_css( $_section, $selector ); $visibility_selector = '.ast-builder-layout-element[data-section="' . $_section . '"]'; $css_output .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $visibility_selector ); $generated_css .= $css_output; } if ( $social_css_flag ) { return self::get_social_static_css() . $generated_css; } return $generated_css; } /** * Load Social default css. * * @since 3.0.0 */ public static function get_social_static_css() { $social_static_css = ' .ast-social-stack-desktop .ast-builder-social-element, .ast-social-stack-tablet .ast-builder-social-element, .ast-social-stack-mobile .ast-builder-social-element { margin-top: 6px; margin-bottom: 6px; } .social-show-label-true .ast-builder-social-element { width: auto; padding: 0 0.4em; } [data-section^="section-fb-social-icons-"] .footer-social-inner-wrap { text-align: center; } .ast-footer-social-wrap { width: 100%; }'; if ( is_rtl() ) { $social_static_css .= '.ast-footer-social-wrap .ast-builder-social-element:first-child { margin-right: 0; } .ast-footer-social-wrap .ast-builder-social-element:last-child { margin-left: 0; } .ast-header-social-wrap .ast-builder-social-element:first-child { margin-right: 0; } .ast-header-social-wrap .ast-builder-social-element:last-child { margin-left: 0; } .ast-builder-social-element { line-height: 1; color: #3a3a3a; background: transparent; vertical-align: middle; transition: all 0.01s; margin-right: 6px; margin-left: 6px; justify-content: center; align-items: center; } .ast-builder-social-element { line-height: 1; color: #3a3a3a; background: transparent; vertical-align: middle; transition: all 0.01s; margin-right: 6px; margin-left: 6px; justify-content: center; align-items: center; } .ast-builder-social-element .social-item-label { padding-right: 6px; }'; } else { $social_static_css .= '.ast-footer-social-wrap .ast-builder-social-element:first-child { margin-left: 0; } .ast-footer-social-wrap .ast-builder-social-element:last-child { margin-right: 0; } .ast-header-social-wrap .ast-builder-social-element:first-child { margin-left: 0; } .ast-header-social-wrap .ast-builder-social-element:last-child { margin-right: 0; } .ast-builder-social-element { line-height: 1; color: var(--ast-global-color-2); background: transparent; vertical-align: middle; transition: all 0.01s; margin-left: 6px; margin-right: 6px; justify-content: center; align-items: center; } .ast-builder-social-element .social-item-label { padding-left: 6px; }'; } return Astra_Enqueue_Scripts::trim_css( $social_static_css ); } } /** * Kicking this off by creating object of this class. */ new Astra_Social_Component_Dynamic_CSS(); PK Wjm[_��{� � I type/base/dynamic-css/widget/class-astra-widget-component-dynamic-css.phpnu �[��� <?php /** * Astra Widget Component Dynamic CSS. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Dynamic CSS. * * @since 3.0.0 */ class Astra_Widget_Component_Dynamic_CSS { /** * Dynamic CSS * * @param string $builder_type Builder Type. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ public static function astra_widget_dynamic_css( $builder_type = 'header' ) { $generated_css = ''; $no_of_widgets = 'header' === $builder_type ? Astra_Builder_Helper::$num_of_header_widgets : Astra_Builder_Helper::$num_of_footer_widgets; for ( $index = 1; $index <= $no_of_widgets; $index++ ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'widget-' . $index, $builder_type ) ) { continue; } $_section = ! astra_has_widgets_block_editor() ? 'sidebar-widgets-' . $builder_type . '-widget-' . $index : 'astra-sidebar-widgets-' . $builder_type . '-widget-' . $index; $selector = '.' . $builder_type . '-widget-area[data-section="sidebar-widgets-' . $builder_type . '-widget-' . $index . '"]'; $margin = astra_get_option( $_section . '-margin' ); /** * Copyright CSS. */ if ( Astra_Builder_Helper::apply_flex_based_css() ) { $builder_widget_selector = $selector . '.' . $builder_type . '-widget-area-inner'; } else { $builder_widget_selector = $selector . ' .' . $builder_type . '-widget-area-inner'; } $title_font_size = astra_get_option( $builder_type . '-widget-' . $index . '-font-size' ); $content_font_size = astra_get_option( $builder_type . '-widget-' . $index . '-content-font-size' ); $title_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-title-color' ), 'desktop' ); $title_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-title-color' ), 'tablet' ); $title_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-title-color' ), 'mobile' ); $text_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-color' ), 'desktop' ); $text_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-color' ), 'tablet' ); $text_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-color' ), 'mobile' ); $link_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-link-color' ), 'desktop' ); $link_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-link-color' ), 'tablet' ); $link_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-link-color' ), 'mobile' ); $link_h_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-link-h-color' ), 'desktop' ); $link_h_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-link-h-color' ), 'tablet' ); $link_h_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-widget-' . $index . '-link-h-color' ), 'mobile' ); $css_output_desktop = array( $builder_widget_selector => array( 'color' => $text_color_desktop, // Typography. 'font-size' => astra_responsive_font( $content_font_size, 'desktop' ), ), $builder_widget_selector . ' a' => array( 'color' => $link_color_desktop, ), $builder_widget_selector . ' a:hover' => array( 'color' => $link_h_color_desktop, ), $selector . ' .widget-title, ' . $selector . ' h1, ' . $selector . ' .widget-area h1, ' . $selector . ' h2, ' . $selector . ' .widget-area h2, ' . $selector . ' h3, ' . $selector . ' .widget-area h3, ' . $selector . ' h4, ' . $selector . ' .widget-area h4, ' . $selector . ' h5, ' . $selector . ' .widget-area h5, ' . $selector . ' h6, ' . $selector . ' .widget-area h6' => array( 'color' => $title_color_desktop, 'font-size' => astra_responsive_font( $title_font_size, 'desktop' ), ), $selector => 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' ), ), ); $css_output_tablet = array( $builder_widget_selector => array( 'color' => $text_color_tablet, // Typography. 'font-size' => astra_responsive_font( $content_font_size, 'tablet' ), ), $selector . ' .widget-title, ' . $selector . ' h1, ' . $selector . ' .widget-area h1, ' . $selector . ' h2, ' . $selector . ' .widget-area h2, ' . $selector . ' h3, ' . $selector . ' .widget-area h3, ' . $selector . ' h4, ' . $selector . ' .widget-area h4, ' . $selector . ' h5, ' . $selector . ' .widget-area h5, ' . $selector . ' h6, ' . $selector . ' .widget-area h6' => array( 'color' => $title_color_tablet, 'font-size' => astra_responsive_font( $title_font_size, 'tablet' ), ), $builder_widget_selector . ' a' => array( 'color' => $link_color_tablet, ), $builder_widget_selector . ' a:hover' => array( 'color' => $link_h_color_tablet, ), $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( $builder_widget_selector => array( 'color' => $text_color_mobile, // Typography. 'font-size' => astra_responsive_font( $content_font_size, 'mobile' ), ), $selector . ' .widget-title, ' . $selector . ' h1, ' . $selector . ' .widget-area h1, ' . $selector . ' h2, ' . $selector . ' .widget-area h2, ' . $selector . ' h3, ' . $selector . ' .widget-area h3, ' . $selector . ' h4, ' . $selector . ' .widget-area h4, ' . $selector . ' h5, ' . $selector . ' .widget-area h5, ' . $selector . ' h6, ' . $selector . ' .widget-area h6' => array( 'color' => $title_color_mobile, 'font-size' => astra_responsive_font( $title_font_size, 'mobile' ), ), $builder_widget_selector . ' a' => array( 'color' => $link_color_mobile, ), $builder_widget_selector . ' a:hover' => array( 'color' => $link_h_color_mobile, ), $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() ); $css_output .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector, 'block' ); $generated_css .= $css_output; } return $generated_css; } } /** * Kicking this off by creating object of this class. */ new Astra_Widget_Component_Dynamic_CSS(); PK Wjm["3�� � E type/base/dynamic-css/html/class-astra-html-component-dynamic-css.phpnu �[��� <?php /** * Astra HTML Component Dynamic CSS. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ // No direct access, please. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Register Builder Dynamic CSS. * * @since 3.0.0 */ class Astra_Html_Component_Dynamic_CSS { /** * Dynamic CSS * * @param string $builder_type Builder Type. * @return String Generated dynamic CSS for Heading Colors. * * @since 3.0.0 */ public static function astra_html_dynamic_css( $builder_type = 'header' ) { $generated_css = ''; $html_css_flag = false; $number_of_html = 'header' === $builder_type ? Astra_Builder_Helper::$num_of_header_html : Astra_Builder_Helper::$num_of_footer_html; for ( $index = 1; $index <= $number_of_html; $index++ ) { if ( ! Astra_Builder_Helper::is_component_loaded( 'html-' . $index, $builder_type ) ) { continue; } $html_css_flag = true; $_section = 'header' === $builder_type ? 'section-hb-html-' . $index : 'section-fb-html-' . $index; $margin = astra_get_option( $_section . '-margin' ); $font_size = astra_get_option( 'font-size-' . $_section ); $text_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'color' ), 'desktop' ); $text_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'color' ), 'tablet' ); $text_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'color' ), 'mobile' ); $link_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'link-color' ), 'desktop' ); $link_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'link-color' ), 'tablet' ); $link_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'link-color' ), 'mobile' ); $link_h_color_desktop = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'link-h-color' ), 'desktop' ); $link_h_color_tablet = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'link-h-color' ), 'tablet' ); $link_h_color_mobile = astra_get_prop( astra_get_option( $builder_type . '-html-' . $index . 'link-h-color' ), 'mobile' ); $selector = 'header' === $builder_type ? '.ast-header-html-' . $index : '.footer-widget-area[data-section="section-fb-html-' . $index . '"]'; $display_prop = 'header' === $builder_type ? 'flex' : 'block'; $css_output_desktop = array( $selector . ' .ast-builder-html-element' => array( 'color' => $text_color_desktop, // Typography. 'font-size' => astra_responsive_font( $font_size, 'desktop' ), ), $selector => array( // Margin. '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' ), ), // Link Color. $selector . ' a' => array( 'color' => $link_color_desktop, ), // Link Hover Color. $selector . ' a:hover' => array( 'color' => $link_h_color_desktop, ), ); /* Parse CSS from array() */ $css_output = astra_parse_css( $css_output_desktop ); // Tablet CSS. $css_output_tablet = array( $selector . ' .ast-builder-html-element' => array( 'color' => $text_color_tablet, // Typography. 'font-size' => astra_responsive_font( $font_size, 'tablet' ), ), $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' ), ), // Link Color. $selector . ' a' => array( 'color' => $link_color_tablet, ), // Link Hover Color. $selector . ' a:hover' => array( 'color' => $link_h_color_tablet, ), ); $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() ); // Mobile CSS. $css_output_mobile = array( $selector . ' .ast-builder-html-element' => array( 'color' => $text_color_mobile, // Typography. 'font-size' => astra_responsive_font( $font_size, 'mobile' ), ), $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' ), ), // Link Color. $selector . ' a' => array( 'color' => $link_color_mobile, ), // Link Hover Color. $selector . ' a:hover' => array( 'color' => $link_h_color_mobile, ), ); $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() ); $generated_css .= $css_output; $generated_css .= Astra_Builder_Base_Dynamic_CSS::prepare_advanced_typography_css( $_section, $selector ); $generated_css .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( $_section, $selector, $display_prop ); } if ( true === $html_css_flag ) { $html_static_css = array( '.ast-builder-html-element img.alignnone' => array( 'display' => 'inline-block', ), '.ast-builder-html-element p:first-child' => array( 'margin-top' => '0', ), '.ast-builder-html-element p:last-child' => array( 'margin-bottom' => '0', ), '.ast-header-break-point .main-header-bar .ast-builder-html-element' => array( 'line-height' => '1.85714285714286', ), ); return astra_parse_css( $html_static_css ) . $generated_css; } return $generated_css; } } /** * Kicking this off by creating object of this class. */ new Astra_Html_Component_Dynamic_CSS(); PK Wjm[�<�;'