'; $output .= ''; $output .= ''; $output .= ''; $output .= ''; $output .= ''; return apply_filters('maia_tbay_get_button_mobile_menu', '
'. $output . '
', 10); } } /** * ------------------------------------------------------------------------------------------------ * The Icon Mobile Menu * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_button_mobile_menu')) { function maia_the_button_mobile_menu() { wp_enqueue_script('jquery-mmenu'); $ouput = maia_tbay_get_button_mobile_menu(); echo trim($ouput); } } /** * ------------------------------------------------------------------------------------------------ * Get Logo Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_tbay_get_logo_mobile')) { function maia_tbay_get_logo_mobile() { $mobilelogo = maia_tbay_get_config('mobile-logo'); $output = ''; return apply_filters('maia_tbay_get_logo_mobile', $output, 10); } } /** * ------------------------------------------------------------------------------------------------ * The Logo Mobile Menu * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_logo_mobile')) { function maia_the_logo_mobile() { $ouput = maia_tbay_get_logo_mobile(); echo trim($ouput); } } /** * ------------------------------------------------------------------------------------------------ * The Mini cart mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_icon_mini_cart_mobile')) { function maia_the_icon_mini_cart_mobile() { ?>
'; $output .= apply_filters('maia_get_filter_title_mobile', 10, 2); $output .= ''; } return apply_filters('maia_tbay_get_title_page_mobile', $output, 10); } } /** * ------------------------------------------------------------------------------------------------ * The icon Back On Header Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_title_page_mobile')) { function maia_the_title_page_mobile() { $output = maia_tbay_get_title_page_mobile(); echo trim($output); } } /** * ------------------------------------------------------------------------------------------------ * Get Icon Home Page On Header Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_tbay_get_icon_home_page_mobile')) { function maia_tbay_get_icon_home_page_mobile() { $output = '
'; $output .= ''; $output .= apply_filters('maia_get_mobile_home_icon', '', 2); $output .= ''; $output .= '
'; return apply_filters('maia_tbay_get_icon_home_page_mobile', $output, 10); } } /** * ------------------------------------------------------------------------------------------------ * The Icon Home Page On Header Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_icon_home_page_mobile')) { function maia_the_icon_home_page_mobile() { $ouput = maia_tbay_get_icon_home_page_mobile(); echo trim($ouput); } } /** * ------------------------------------------------------------------------------------------------ * The Hook Config Header Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_hook_header_mobile_all_page')) { function maia_the_hook_header_mobile_all_page() { $always_display_logo = maia_tbay_get_config('always_display_logo', true); if ($always_display_logo) { remove_action('maia_header_mobile_content', 'maia_the_icon_home_page_mobile', 10); } if ($always_display_logo || maia_tbay_is_home_page()) { return; } remove_action('maia_header_mobile_content', 'maia_the_logo_mobile', 15); add_action('maia_header_mobile_content', 'maia_the_title_page_mobile', 15); } } /** * ------------------------------------------------------------------------------------------------ * The Hook Menu Mobile All page Header Mobile * ------------------------------------------------------------------------------------------------ */ /** * ------------------------------------------------------------------------------------------------ * Get Icon Home Page On Footer Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_tbay_get_icon_home_footer_mobile')) { function maia_tbay_get_icon_home_footer_mobile() { $active = (is_front_page()) ? 'active' : ''; $output = '
'; $output .= ''; $output .= apply_filters('maia_get_mobile_home_icon', '', 2); $output .= ''. esc_html__('Home', 'maia'). ''; $output .=''; $output .='
'; return apply_filters('maia_tbay_get_icon_home_footer_mobile', $output, 10); } } /** * ------------------------------------------------------------------------------------------------ * The Icon Home Page On Footer Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_icon_home_footer_mobile')) { function maia_the_icon_home_footer_mobile() { $ouput = maia_tbay_get_icon_home_footer_mobile(); echo trim($ouput); } } /** * ------------------------------------------------------------------------------------------------ * Get Icon Wishlist On Footer Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_tbay_get_icon_wishlist_footer_mobile')) { function maia_tbay_get_icon_wishlist_footer_mobile() { $output = ''; if (!class_exists('YITH_WCWL')) { return $output; } $wishlist_url = YITH_WCWL()->get_wishlist_url(); $wishlist_count = (YITH_WCWL_VERSION >= '4.0.0') ? yith_wcwl_count_products() : YITH_WCWL()->count_products(); $output .= '
'; $output .= ''; $output .= apply_filters('maia_get_mobile_wishlist_icon', '', 2); $output .= ''. esc_html($wishlist_count) .''; $output .= ''. esc_html__('Wishlist', 'maia'). ''; $output .=''; $output .='
'; return apply_filters('maia_tbay_get_icon_wishlist_footer_mobile', $output, 10); } } /** * ------------------------------------------------------------------------------------------------ * The Icon Wishlist On Footer Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_icon_wishlist_footer_mobile')) { function maia_the_icon_wishlist_footer_mobile() { $ouput = maia_tbay_get_icon_wishlist_footer_mobile(); echo trim($ouput); } } /** * ------------------------------------------------------------------------------------------------ * Get Icon Account On Footer Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_tbay_get_icon_account_footer_mobile')) { function maia_tbay_get_icon_account_footer_mobile() { $output = ''; if (!maia_woocommerce_activated() || maia_catalog_mode_active()) { return $output; } $icon_text = apply_filters('maia_get_mobile_user_icon', '', 2); $icon_text .= ''.esc_html__('Account', 'maia').''; $active = (is_account_page()) ? 'active' : ''; $output .= '
'; if (is_user_logged_in()) { $output .= ''; } else { $output .= ''; } $output .= $icon_text; $output .= ''; $output .='
'; return apply_filters('maia_tbay_get_icon_account_footer_mobile', $output, 10); } } /** * ------------------------------------------------------------------------------------------------ * The Icon Account On Footer Mobile * ------------------------------------------------------------------------------------------------ */ if (! function_exists('maia_the_icon_account_footer_mobile')) { function maia_the_icon_account_footer_mobile() { $ouput = maia_tbay_get_icon_account_footer_mobile(); echo trim($ouput); } } if (! function_exists('maia_the_custom_list_menu_icon')) { function maia_the_custom_list_menu_icon() { $slides = maia_tbay_get_config('mobile_footer_slides'); if (!maia_tbay_get_config('mobile_footer_icon', true) || empty($slides)) { return; } $list_menu_icon = ''; foreach ($slides as $key => $value) { $list_menu_icon .= maia_get_list_menu_icon($value); } if (!empty($list_menu_icon)) { printf('
%s
', apply_filters('maia_list_menu_icon', $list_menu_icon)); } } add_action('maia_footer_mobile_content', 'maia_the_custom_list_menu_icon', 10); } if (! function_exists('maia_get_list_menu_icon')) { function maia_get_list_menu_icon($value) { $title = (isset($value['title'])) ? $value['title'] : ''; $link = (isset($value['url'])) ? $value['url'] : ''; $icon = (isset($value['description'])) ? $value['description'] : ''; $thumb = (isset($value['thumb'])) ? $value['thumb'] : ''; $class = ''; $matches = array(); preg_match_all('/{{(.*?)}}/', $link, $matches); if (isset($matches[1][0]) && !is_null($matches[1][0])) { $url_wishlist = $url_account = ''; if (maia_woocommerce_activated() && !maia_catalog_mode_active()) { $url_account = apply_filters('wpml_woo_myaccount_url', get_permalink(get_option('woocommerce_myaccount_page_id'))); $url_cart = apply_filters('wpml_woo_cart_url', wc_get_cart_url()); $url_checkout = apply_filters('wpml_woo_checkout_url', wc_get_checkout_url()); $url_shop = apply_filters('wpml_woo_shop_url', get_permalink(wc_get_page_id('shop'))); if (class_exists('YITH_WCWL')) { $url_wishlist = apply_filters('wpml_woo_wishlist_url', YITH_WCWL()->get_wishlist_url()); } switch ($matches[1][0]) { case 'home': $link = apply_filters('wpml_home_url', site_url()); break; case 'wishlist': $link = $url_wishlist; break; case 'shop': $link = $url_shop; break; case 'account': $link = $url_account; break; case 'cart': $link = $url_cart; break; case 'checkout': $link = $url_checkout; break; default: break; } } else { $link = apply_filters('wpml_home_url', site_url()); } if (empty($link)) { return; } $class .= $matches[1][0]; } if (empty($title) && empty($icon)&& empty($thumb)) { return; } global $wp; $current_url = home_url(add_query_arg(array(), $wp->request)); $class .= ($current_url == rtrim($link, "/")) ? ' active' : ''; $output = ''; return $output; } }