PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.7.0
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.7.0
1.7.0 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 All 50 releases
fluent-cart / app / Views / frontend / customer_menu.php

customer_menu.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.7.0, at app/Views/frontend/customer_menu.php

101 lines 5.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit; // Exit if accessed directly.
4 }
5 /**
6 * @var $menuItems
7 * @var $profileData
8 */
9 ?>
10
11 <div id="fct-customer-dashboard-navs-wrap" class="fct-customer-dashboard-navs-wrap" role="navigation" aria-label="<?php esc_attr_e('Customer Dashboard', 'fluent-cart'); ?>">
12 <div class="fct-nav-compact-toggle-wrap">
13 <button
14 type="button"
15 aria-label="<?php esc_attr_e('Toggle navigation menu', 'fluent-cart'); ?>"
16 id="fct-customer-nav-compact-toggle"
17 >
18 <svg class="fct-compact-toggle-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
19 <path d="M12.1329 5.08936L13.115 6.07145L9.88108 9.30539L16.2505 9.30546L16.2504 10.6943L9.88108 10.6943L13.115 13.9282L12.133 14.9103L7.22246 9.99983L12.1329 5.08936ZM4.44482 14.8609V5.13867H5.83371V14.8609H4.44482Z" fill="#565865"/>
20 </svg>
21 </button>
22 </div>
23
24 <?php if($profileData): ?>
25 <div class="fct-customer-dashboard-customer-info" role="banner">
26 <span class="fct-customer-dashboard-avatar" aria-hidden="true">
27 <?php if (!empty($profileData['photo'])) : ?>
28 <img src="<?php echo esc_url($profileData['photo']); ?>" alt="" loading="lazy" onerror="this.remove()" />
29 <?php endif; ?>
30 <svg class="fct-customer-dashboard-avatar-placeholder" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" aria-hidden="true">
31 <path d="M16.6667 17.5V15.8333C16.6667 14.9493 16.3155 14.1014 15.6904 13.4763C15.0653 12.8512 14.2174 12.5 13.3334 12.5H6.66671C5.78265 12.5 4.93481 12.8512 4.30968 13.4763C3.68456 14.1014 3.33337 14.9493 3.33337 15.8333V17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
32 <path d="M10 9.16667C11.8410 9.16667 13.3334 7.67428 13.3334 5.83333C13.3334 3.99238 11.8410 2.5 10 2.5C8.15909 2.5 6.66671 3.99238 6.66671 5.83333C6.66671 7.67428 8.15909 9.16667 10 9.16667Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
33 </svg>
34 </span>
35 <div class="fct-customer-dashboard-customer-info-content">
36 <h3><?php echo esc_attr($profileData['full_name']); ?></h3>
37 <p><?php echo esc_attr($profileData['email']); ?></p>
38 </div>
39 </div>
40 <?php endif; ?>
41
42 <div id="fct-customer-menu-container">
43 <button
44 id="fct-customer-menu-toggle"
45 type="button"
46 aria-expanded="false"
47 aria-controls="fct-customer-menu-holder"
48 aria-label="<?php esc_attr_e('Toggle navigation menu', 'fluent-cart'); ?>"
49 >
50 <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 4H21V6H3V4ZM3 11H21V13H3V11ZM3 18H21V20H3V18Z"></path></svg>
51 </button>
52
53 <div id="fct-customer-menu-holder" aria-hidden="false">
54 <div class="fct-customer-navs-wrap">
55 <ul class="fct-customer-navs" role="list">
56 <?php foreach ($menuItems as $itemSlug => $menuItem): ?>
57 <li class="fct-customer-nav-item fct-customer-nav-item-<?php echo esc_attr($itemSlug); ?>" role="listitem">
58 <a
59 class="fct-customer-nav-link <?php echo esc_attr(\FluentCart\Framework\Support\Arr::get($menuItem, 'css_class')); ?>"
60 aria-label="<?php echo esc_attr($menuItem['label']) ?>"
61 href="<?php echo esc_url($menuItem['link']); ?>"
62 >
63 <span class="fct-customer-nav-link-icon">
64 <?php
65 if (!empty($menuItem['icon_svg'])) {
66 echo wp_kses(
67 $menuItem['icon_svg'],
68 apply_filters('fct_allowed_svg_tags', [])
69 );
70 } elseif (!empty($menuItem['icon_url'])) {
71 echo '<img src="' . esc_url($menuItem['icon_url']) . '" alt="" />';
72 }
73 ?>
74 </span>
75
76 <span class="fct-customer-nav-link-text">
77 <?php echo esc_html($menuItem['label']); ?>
78 </span>
79 </a>
80
81 <span class="fct-customer-nav-tooltip">
82 <?php echo esc_html($menuItem['label']); ?>
83 </span>
84 </li>
85 <?php endforeach; ?>
86 </ul>
87 </div>
88
89 <!-- Logout Button -->
90 <div id="fct-customer-logout-button">
91 <a href="<?php echo esc_url(wp_logout_url(home_url())); ?>" title="<?php echo esc_attr__('Logout', 'fluent-cart'); ?>" class="fct-customer-logout-btn" aria-label="<?php esc_attr_e('Logout', 'fluent-cart'); ?>">
92 <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M5 22C4.44772 22 4 21.5523 4 21V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V6H18V4H6V20H18V18H20V21C20 21.5523 19.5523 22 19 22H5ZM18 16V13H11V11H18V8L23 12L18 16Z"></path></svg>
93
94 <span class="button-text"><?php esc_html_e('Logout', 'fluent-cart'); ?></span>
95 </a>
96 </div>
97 </div>
98 </div>
99 </div>
100
101