Initial Commit N° : 003 - V.4.3.5

This commit is contained in:
2025-03-28 14:51:03 +01:00
parent 579b475021
commit 1ec9986b28
78 changed files with 1974 additions and 10329 deletions
+28 -15
View File
@@ -101,10 +101,11 @@ if (!function_exists('elessi_add_action_header')):
/* Header Default */
add_action('nasa_header_structure', 'elessi_get_header_structure', 10);
add_action('nasa_header_structure', 'elessi_block_header', 100);
add_action('nasa_before_page_wrapper', 'elessi_block_header', 1);
add_action('woocommerce_before_main_content', 'elessi_block_header', 1);
/* Breadcrumb site */
add_action('woocommerce_before_main_content', 'elessi_get_breadcrumb', 1);
add_action('woocommerce_before_main_content', 'elessi_get_breadcrumb', 2);
add_action('nasa_before_page_wrapper', 'elessi_get_breadcrumb', 1);
// add_action('nasa_before_archive_blogs', 'elessi_get_breadcrumb', 1);
// add_action('nasa_before_single_post', 'elessi_get_breadcrumb', 1);
@@ -151,7 +152,8 @@ if (!function_exists('elessi_products_ma_remove_breadcrumb')) :
if ($in_mobile && isset($nasa_opt['mobile_layout']) && $nasa_opt['mobile_layout'] == 'app') {
/* Remove Breadcrumb site */
remove_action('woocommerce_before_main_content', 'elessi_get_breadcrumb', 1);
remove_action('woocommerce_before_main_content', 'elessi_get_breadcrumb', 2);
remove_action('nasa_before_page_wrapper', 'elessi_get_breadcrumb', 1);
/* Remove Breadcrumb for Header Elementor-Pro */
if (function_exists('elementor_pro_load_plugin')) {
@@ -172,7 +174,7 @@ if (!function_exists('elessi_get_header_structure')):
$has_vertical = array('4', '6', '8');
$not_search_icon = array('3', '4', '5', '6', '7', '8');
$transparent = array('1', '2', '3', '5', '7');
$transparent = array('1', '2', '3', '5', '7','9');
$hstructure = isset($nasa_opt['header-type']) ? $nasa_opt['header-type'] : '1';
@@ -180,7 +182,7 @@ if (!function_exists('elessi_get_header_structure')):
* Header builder
*/
if ($hstructure == 'nasa-custom') {
remove_action('nasa_header_structure', 'elessi_block_header', 100);
remove_action('nasa_before_page_wrapper', 'elessi_block_header', 1);
$header_slug = isset($nasa_opt['header-custom']) && $nasa_opt['header-custom'] != 'default' ?
$nasa_opt['header-custom'] : false;
@@ -196,7 +198,7 @@ if (!function_exists('elessi_get_header_structure')):
* Header Elementor builder
*/
if ($hstructure == 'nasa-elm') {
remove_action('nasa_header_structure', 'elessi_block_header', 100);
remove_action('nasa_before_page_wrapper', 'elessi_block_header', 1);
$header_e = isset($nasa_opt['header-elm']) && $nasa_opt['header-elm'] != 'default' ?
$nasa_opt['header-elm'] : false;
@@ -382,7 +384,7 @@ if (!function_exists('elessi_header_icons')) :
*/
$account_icon = (isset($nasa_opt['acc_pos']) && $nasa_opt['acc_pos'] == 'group') ? true : false;
$account_icon = isset($nasa_opt['header-type']) && $nasa_opt['header-type'] == '8' ? true : $account_icon;
$account_icon = in_array($hstructure,array('8','9')) ? true : $account_icon;
if (
!$account_icon &&
@@ -404,15 +406,21 @@ if (!function_exists('elessi_header_icons')) :
$subacc = elessi_sub_account();
$icon = apply_filters('nasa_mini_icon_account', '<svg width="24" height="24" viewBox="0 0 32 32" fill="currentColor"><path d="M16 3.205c-7.067 0-12.795 5.728-12.795 12.795s5.728 12.795 12.795 12.795 12.795-5.728 12.795-12.795c0-7.067-5.728-12.795-12.795-12.795zM16 4.271c6.467 0 11.729 5.261 11.729 11.729 0 2.845-1.019 5.457-2.711 7.49-1.169-0.488-3.93-1.446-5.638-1.951-0.146-0.046-0.169-0.053-0.169-0.66 0-0.501 0.206-1.005 0.407-1.432 0.218-0.464 0.476-1.244 0.569-1.944 0.259-0.301 0.612-0.895 0.839-2.026 0.199-0.997 0.106-1.36-0.026-1.7-0.014-0.036-0.028-0.071-0.039-0.107-0.050-0.234 0.019-1.448 0.189-2.391 0.118-0.647-0.030-2.022-0.921-3.159-0.562-0.719-1.638-1.601-3.603-1.724l-1.078 0.001c-1.932 0.122-3.008 1.004-3.57 1.723-0.89 1.137-1.038 2.513-0.92 3.159 0.172 0.943 0.239 2.157 0.191 2.387-0.010 0.040-0.025 0.075-0.040 0.111-0.131 0.341-0.225 0.703-0.025 1.7 0.226 1.131 0.579 1.725 0.839 2.026 0.092 0.7 0.35 1.48 0.569 1.944 0.159 0.339 0.234 0.801 0.234 1.454 0 0.607-0.023 0.614-0.159 0.657-1.767 0.522-4.579 1.538-5.628 1.997-1.725-2.042-2.768-4.679-2.768-7.555 0-6.467 5.261-11.729 11.729-11.729zM7.811 24.386c1.201-0.49 3.594-1.344 5.167-1.808 0.914-0.288 0.914-1.058 0.914-1.677 0-0.513-0.035-1.269-0.335-1.908-0.206-0.438-0.442-1.189-0.494-1.776-0.011-0.137-0.076-0.265-0.18-0.355-0.151-0.132-0.458-0.616-0.654-1.593-0.155-0.773-0.089-0.942-0.026-1.106 0.027-0.070 0.053-0.139 0.074-0.216 0.128-0.468-0.015-2.005-0.17-2.858-0.068-0.371 0.018-1.424 0.711-2.311 0.622-0.795 1.563-1.238 2.764-1.315l1.011-0.001c1.233 0.078 2.174 0.521 2.797 1.316 0.694 0.887 0.778 1.94 0.71 2.312-0.154 0.852-0.298 2.39-0.17 2.857 0.022 0.078 0.047 0.147 0.074 0.217 0.064 0.163 0.129 0.333-0.025 1.106-0.196 0.977-0.504 1.461-0.655 1.593-0.103 0.091-0.168 0.218-0.18 0.355-0.051 0.588-0.286 1.338-0.492 1.776-0.236 0.502-0.508 1.171-0.508 1.886 0 0.619 0 1.389 0.924 1.68 1.505 0.445 3.91 1.271 5.18 1.77-2.121 2.1-5.035 3.4-8.248 3.4-3.183 0-6.073-1.277-8.188-3.342z"/></svg>');
if ($hstructure == '8') {
$title_acc = !NASA_CORE_USER_LOGGED ? wp_kses_post(__('Login <br> Register', 'elessi-theme')) : wp_kses_post(__('My <br> Account', 'elessi-theme'));
$icon .= $icon_text ? '<span class="icon-text">' . $title_acc . '</span>' : '';
} else {
$icon .= $icon_text ? '<span class="icon-text">' . esc_html__('Account', 'elessi-theme') . '</span>' : '';
switch ($hstructure) {
case '8':
$title_8 = !NASA_CORE_USER_LOGGED ? wp_kses_post(__('Login <br> Register', 'elessi-theme')) : wp_kses_post(__('My <br> Account', 'elessi-theme'));
$icon .= $icon_text ? '<span class="icon-text">' . $title_8 . '</span>' : '';
break;
case '9':
$icon .= '<span class="icon-text">' . $title_acc . '</span>';
break;
default:
$icon .= $icon_text ? '<span class="icon-text">' . esc_html__('Account', 'elessi-theme') . '</span>' : '';
break;
}
$nasa_icon_account =
'<a class="nasa-login-register-ajax nasa-flex" data-enable="' . $login_ajax . '" href="' . esc_url($links) . '" title="' . $title_acc . '">' .
@@ -1287,12 +1295,17 @@ endif;
add_action('nasa_left_header_mobile_df', 'elessi_left_header_mobile_df');
if (!function_exists('elessi_left_header_mobile_df')) :
function elessi_left_header_mobile_df() {
echo '<a href="javascript:void(0);" class="nasa-icon nasa-mobile-menu_toggle mobile_toggle nasa-mobile-menu-icon nasa-flex" rel="nofollow"><svg width="26" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" /></svg></a>';
$menu_svg = apply_filters('elessi_mobile_menu_svg', '<svg width="26" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" /></svg>');
$search_svg = apply_filters('elessi_mobile_search_svg', '<svg fill="currentColor" viewBox="0 0 80 80" width="24" height="24"><path d="M74.3,72.2L58.7,56.5C69.9,44,69,24.8,56.5,13.5s-31.7-10.3-43,2.2s-10.3,31.7,2.2,43c11.6,10.5,29.3,10.5,40.9,0 l15.7,15.7L74.3,72.2z M36.1,63.5c-15.1,0-27.4-12.3-27.4-27.4C8.7,20.9,21,8.7,36.1,8.7c15.1,0,27.4,12.3,27.4,27.4 C63.5,51.2,51.2,63.5,36.1,63.5z"/><path d="M36.1,12.8v3c11.2,0,20.3,9.1,20.3,20.3h3C59.4,23.2,49,12.8,36.1,12.8z"/></svg>');
echo '<a href="javascript:void(0);" class="nasa-icon nasa-mobile-menu_toggle mobile_toggle nasa-mobile-menu-icon nasa-flex" rel="nofollow">'.$menu_svg.'</a>';
echo '<a class="nasa-icon mobile-search" href="javascript:void(0);" rel="nofollow"><svg fill="currentColor" viewBox="0 0 80 80" width="24" height="24"><path d="M74.3,72.2L58.7,56.5C69.9,44,69,24.8,56.5,13.5s-31.7-10.3-43,2.2s-10.3,31.7,2.2,43c11.6,10.5,29.3,10.5,40.9,0 l15.7,15.7L74.3,72.2z M36.1,63.5c-15.1,0-27.4-12.3-27.4-27.4C8.7,20.9,21,8.7,36.1,8.7c15.1,0,27.4,12.3,27.4,27.4 C63.5,51.2,51.2,63.5,36.1,63.5z"/><path d="M36.1,12.8v3c11.2,0,20.3,9.1,20.3,20.3h3C59.4,23.2,49,12.8,36.1,12.8z"/></svg></a>';
echo '<a class="nasa-icon mobile-search" href="javascript:void(0);" rel="nofollow">' . $search_svg . '</a>';
}
endif;
/**
* Since 5.0.1
*