fix(user-center): embed official certification panel
This commit is contained in:
1 parent
d3bf75fbea
commit
0a04c3e4cc
22 files changed
+415
-461
No files matched your search
@@ -11,10 +11,7 @@ $cart_url = function_exists('aksrt_get_cart_page_url') ? aksrt_get_cart_page_url
|
||||
$level_url = isset($dashboard_tabs['credits'])
|
||||
? add_query_arg('asset_tab', 'points', aksrt_get_user_center_tab_url('credits'))
|
||||
: '';
|
||||
$auth_settings = class_exists('\AKSRT\User\AuthApply') ? \AKSRT\User\AuthApply::settings() : [];
|
||||
$auth_url = !empty($auth_settings['enabled']) && function_exists('aksrt_get_user_auth_page_url')
|
||||
? aksrt_get_user_auth_page_url()
|
||||
: '';
|
||||
$auth_url = isset($dashboard_tabs['auth']) ? aksrt_get_user_center_tab_url('auth') : '';
|
||||
|
||||
$services = array_values(array_filter([
|
||||
[
|
||||
@@ -34,6 +31,7 @@ $services = array_values(array_filter([
|
||||
'icon' => 'id-badge',
|
||||
'tone' => 'auth',
|
||||
'url' => $auth_url,
|
||||
'tab' => 'auth',
|
||||
],
|
||||
], static fn(array $item): bool => (string) $item['url'] !== ''));
|
||||
|
||||
@@ -63,7 +61,7 @@ $render_grid = static function (array $items): void {
|
||||
?>
|
||||
<div class="uc-service-grid">
|
||||
<?php foreach ($items as $item) : ?>
|
||||
<a class="uc-service-grid__item uc-service-grid__item--<?php echo esc_attr((string) $item['tone']); ?>" href="<?php echo esc_url((string) $item['url']); ?>">
|
||||
<a class="uc-service-grid__item uc-service-grid__item--<?php echo esc_attr((string) $item['tone']); ?><?php echo !empty($item['tab']) && ($active_tab ?? '') === $item['tab'] ? ' is-active' : ''; ?>" href="<?php echo esc_url((string) $item['url']); ?>"<?php if (!empty($item['tab'])) : ?> data-tab="<?php echo esc_attr((string) $item['tab']); ?>"<?php endif; ?>>
|
||||
<span class="uc-service-grid__icon">
|
||||
<i class="fas fa-<?php echo esc_attr((string) $item['icon']); ?>" aria-hidden="true"></i>
|
||||
<?php if (!empty($item['count'])) : ?><small><?php echo esc_html((string) $item['count']); ?></small><?php endif; ?>
|
||||
|
||||
Reference in new issue
Block a user