Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
255 lines
12 KiB
PHP
255 lines
12 KiB
PHP
<?php
|
||
/**
|
||
* 站点页脚 — legacy template_1 shell
|
||
*
|
||
* 主内容区对齐 legacy `legacy` 契约;浮动按钮与移动端 tabbar 保留。
|
||
*
|
||
* @package Jio
|
||
* @version 4.1.0
|
||
*/
|
||
|
||
defined('ABSPATH') || exit;
|
||
|
||
// 数据准备
|
||
$blog_name = function_exists('jio_get_site_logo_text') ? jio_get_site_logo_text() : get_bloginfo('name');
|
||
$has_settings = class_exists('\Jio\Settings\Settings');
|
||
|
||
// §2.3 三列结构化字段(legacy keys)
|
||
$footer_brand = $has_settings ? \Jio\Settings\Settings::get_footer_brand_settings() : ['m_s' => ['pc', 'mobile'], 'img' => '', 'img_dark' => '', 'title' => '', 'custom_code' => ''];
|
||
$footer_contact_ext = $has_settings ? \Jio\Settings\Settings::get_footer_contact_extended_settings() : ['m_s' => ['pc', 'mobile'], 'wechat_img' => '', 'qq' => '', 'weibo' => '', 'email' => '', 'more' => [], 'code_1' => '', 'code_2' => ''];
|
||
$footer_mini = $has_settings ? \Jio\Settings\Settings::get_footer_mini_img_settings() : ['m_s' => ['pc', 'mobile'], 'items' => [], 'items_2' => []];
|
||
$footer_customize_code = $has_settings ? \Jio\Settings\Settings::get_footer_customize_code() : '';
|
||
$footer_template = $has_settings ? \Jio\Settings\Settings::get_footer_template() : 'template_1';
|
||
|
||
// 设备可见性 → legacy hidden-xs(仅在不含 mobile 时隐藏移动端)
|
||
$_brand_show_sm = in_array('mobile', (array) ($footer_brand['m_s'] ?? []), true);
|
||
$_contact_show_sm = in_array('mobile', (array) ($footer_contact_ext['m_s'] ?? []), true);
|
||
$_mini_show_sm = in_array('mobile', (array) ($footer_mini['m_s'] ?? []), true);
|
||
$_brand_xs_cls = $_brand_show_sm ? '' : ' hidden-xs';
|
||
$_contact_xs_cls = $_contact_show_sm ? '' : ' hidden-xs';
|
||
$_mini_xs_cls = $_mini_show_sm ? '' : ' hidden-xs';
|
||
|
||
// 品牌 / 联系 / 二维码列内容存在性
|
||
$_logo_html = '';
|
||
if (function_exists('jio_get_adaptive_theme_img')) {
|
||
$_logo_html = jio_get_adaptive_theme_img(
|
||
(string) ($footer_brand['img'] ?? ''),
|
||
(string) ($footer_brand['img_dark'] ?? ''),
|
||
$blog_name,
|
||
'style="height: 40px;"'
|
||
);
|
||
}
|
||
$_has_brand = $_logo_html !== '' || !empty($footer_brand['title']) || !empty($footer_brand['custom_code']);
|
||
|
||
$_fcode_links = trim((string) ($footer_contact_ext['code_1'] ?? ''));
|
||
|
||
$_has_contact_icons = !empty($footer_contact_ext['wechat_img'])
|
||
|| !empty($footer_contact_ext['qq'])
|
||
|| !empty($footer_contact_ext['email'])
|
||
|| !empty($footer_contact_ext['more'])
|
||
|| !empty($footer_contact_ext['weibo']);
|
||
$_has_links_col = $_fcode_links !== '' || !empty($footer_contact_ext['code_2']) || $_has_contact_icons;
|
||
$_has_mini = !empty($footer_mini['items']) || !empty($footer_mini['items_2']);
|
||
$_has_cols = $_has_brand || $_has_links_col || $_has_mini;
|
||
|
||
$_footer_conter = wp_kses_post(trim((string) $footer_customize_code));
|
||
?>
|
||
|
||
<?php if (is_active_sidebar('single_bottom_fluid') && is_singular('post')) : ?>
|
||
<div class="fluid-widget-wrap">
|
||
<?php dynamic_sidebar('single_bottom_fluid'); ?>
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
<?php \Jio\WidgetSystem\WidgetAreas::render('all_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||
|
||
<footer class="footer" data-jio-shell="site-footer" data-footer-template="<?php echo esc_attr($footer_template); ?>" role="contentinfo">
|
||
<?php if (is_active_sidebar('all_footer')) : ?>
|
||
<?php dynamic_sidebar('all_footer'); ?>
|
||
<?php endif; ?>
|
||
|
||
<div class="container-fluid container-footer">
|
||
<?php if ($_has_cols) : ?>
|
||
<ul class="flex ac gap20 footer-contact-box list-inline">
|
||
<?php if ($_has_brand) : ?>
|
||
<li class="<?php echo esc_attr(trim($_brand_xs_cls)); ?>" style="max-width: 300px;">
|
||
<?php if ($_logo_html !== '') : ?>
|
||
<p>
|
||
<a class="footer-logo" href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr($blog_name); ?>">
|
||
<?php echo $_logo_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||
</a>
|
||
</p>
|
||
<?php endif; ?>
|
||
<?php if (!empty($footer_brand['title'])) : ?>
|
||
<p class="title-h-left"><?php echo esc_html($footer_brand['title']); ?></p>
|
||
<?php endif; ?>
|
||
<?php if (!empty($footer_brand['custom_code'])) : ?>
|
||
<div class="footer-muted em09"><?php echo wp_kses_post($footer_brand['custom_code']); ?></div>
|
||
<?php endif; ?>
|
||
</li>
|
||
<?php endif; ?>
|
||
|
||
<?php if ($_has_links_col) : ?>
|
||
<li style="max-width: 550px;">
|
||
<?php if ($_fcode_links !== '') : ?>
|
||
<p class="fcode-links"><?php echo wp_kses_post($_fcode_links); ?></p>
|
||
<?php endif; ?>
|
||
|
||
<?php if (!empty($footer_contact_ext['code_2'])) : ?>
|
||
<div class="footer-muted em09"><?php echo wp_kses_post($footer_contact_ext['code_2']); ?></div>
|
||
<?php endif; ?>
|
||
|
||
<?php if ($_has_contact_icons) : ?>
|
||
<div class="footer-contact mt10<?php echo esc_attr($_contact_xs_cls); ?>">
|
||
<?php if (!empty($footer_contact_ext['wechat_img'])) : ?>
|
||
<a class="toggle-radius hover-show nowave" href="javascript:;" title="<?php esc_attr_e('微信', 'jio'); ?>">
|
||
<i class="fa fab fa-weixin" aria-hidden="true"></i>
|
||
<div class="hover-show-con footer-wechat-img">
|
||
<img style="box-shadow: 0 5px 10px rgba(0,0,0,.2); border-radius:4px;" height="100" src="<?php echo esc_url($footer_contact_ext['wechat_img']); ?>" alt="<?php esc_attr_e('微信', 'jio'); ?>">
|
||
</div>
|
||
</a>
|
||
<?php endif; ?>
|
||
<?php if (!empty($footer_contact_ext['qq'])) : ?>
|
||
<a class="toggle-radius" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e('QQ', 'jio'); ?>" href="<?php echo esc_url('https://wpa.qq.com/msgrd?v=3&uin=' . rawurlencode((string) $footer_contact_ext['qq']) . '&site=qq&menu=yes'); ?>">
|
||
<i class="fa fab fa-qq" aria-hidden="true"></i>
|
||
</a>
|
||
<?php endif; ?>
|
||
<?php if (!empty($footer_contact_ext['weibo'])) : ?>
|
||
<a class="toggle-radius" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e('微博', 'jio'); ?>" href="<?php echo esc_url($footer_contact_ext['weibo']); ?>">
|
||
<i class="fa fab fa-weibo" aria-hidden="true"></i>
|
||
</a>
|
||
<?php endif; ?>
|
||
<?php if (!empty($footer_contact_ext['email'])) : ?>
|
||
<a class="toggle-radius" title="<?php esc_attr_e('邮箱', 'jio'); ?>" href="<?php echo esc_url('mailto:' . $footer_contact_ext['email']); ?>">
|
||
<i class="fa fas fa-envelope" aria-hidden="true"></i>
|
||
</a>
|
||
<?php endif; ?>
|
||
<?php foreach ((array) ($footer_contact_ext['more'] ?? []) as $more_item) :
|
||
if (!is_array($more_item)) {
|
||
continue;
|
||
}
|
||
$m_img = (string) ($more_item['img'] ?? '');
|
||
$m_url = (string) ($more_item['link'] ?? '');
|
||
$m_text = (string) ($more_item['desc'] ?? '');
|
||
$m_icon = (string) ($more_item['icon'] ?? '');
|
||
$m_icon_html = $m_icon !== '' ? jio_icon_markup($m_icon) : '';
|
||
if ($m_icon_html === '') {
|
||
$m_icon_html = '<i class="fa fas fa-heart" aria-hidden="true"></i>';
|
||
}
|
||
if ($m_img !== '') :
|
||
?>
|
||
<a class="toggle-radius hover-show nowave" href="javascript:;" title="<?php echo esc_attr($m_text); ?>">
|
||
<?php echo $m_icon_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||
<div class="hover-show-con footer-wechat-img">
|
||
<img style="box-shadow: 0 5px 10px rgba(0,0,0,.2); border-radius:4px;" height="100" src="<?php echo esc_url($m_img); ?>" alt="<?php echo esc_attr($m_text); ?>">
|
||
</div>
|
||
</a>
|
||
<?php elseif ($m_url !== '') : ?>
|
||
<a class="toggle-radius" target="_blank" rel="noopener noreferrer" title="<?php echo esc_attr($m_text); ?>" href="<?php echo esc_url($m_url); ?>">
|
||
<?php echo $m_icon_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||
</a>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
<?php endif; ?>
|
||
</li>
|
||
<?php endif; ?>
|
||
|
||
<?php if ($_has_mini) : ?>
|
||
<li class="<?php echo esc_attr(trim($_mini_xs_cls)); ?>">
|
||
<?php foreach (['items' => 'footer-miniimg flex at hh gap6', 'items_2' => 'footer-miniimg-2 flex at hh gap6'] as $items_key => $items_class) : ?>
|
||
<?php if (!empty($footer_mini[$items_key])) : ?>
|
||
<div class="<?php echo esc_attr($items_class); ?>">
|
||
<?php foreach ($footer_mini[$items_key] as $mi) :
|
||
$mi_img = (string) ($mi['image'] ?? '');
|
||
$mi_text = (string) ($mi['text'] ?? '');
|
||
$mi_link = is_array($mi['link'] ?? null) ? $mi['link'] : [];
|
||
$mi_url = (string) ($mi_link['url'] ?? '');
|
||
$mi_target = (string) ($mi_link['target'] ?? '');
|
||
?>
|
||
<?php if ($mi_url !== '') : ?>
|
||
<a href="<?php echo esc_url($mi_url); ?>"<?php echo $mi_target !== '' ? ' target="' . esc_attr($mi_target) . '"' : ''; ?>>
|
||
<?php endif; ?>
|
||
<div<?php echo $mi_text !== '' ? ' title="' . esc_attr($mi_text) . '"' : ''; ?>>
|
||
<img<?php echo jio_get_lazy_attr('lazy_other', $mi_img); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> alt="<?php echo esc_attr($mi_text !== '' ? $mi_text : $blog_name); ?>">
|
||
<?php if ($mi_text !== '') : ?>
|
||
<div class="opacity8 em09 mt6 text-center"><?php echo esc_html($mi_text); ?></div>
|
||
<?php endif; ?>
|
||
</div>
|
||
<?php if ($mi_url !== '') : ?>
|
||
</a>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
<?php endif; ?>
|
||
<?php endforeach; ?>
|
||
</li>
|
||
<?php endif; ?>
|
||
</ul>
|
||
<?php endif; ?>
|
||
|
||
<?php if ($_footer_conter !== '') : ?>
|
||
<p class="footer-conter"><?php echo $_footer_conter; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||
<?php endif; ?>
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
<?php
|
||
// 右侧悬浮按钮由 jio_float_right() 挂 wp_footer 输出(inc/helpers/jio-float-buttons.php)。
|
||
$jio_hide_chrome = is_page_template('templates/pages/page-submit.php');
|
||
$tabbar_settings = $has_settings ? \Jio\Settings\Settings::get_footer_tabbar_settings() : [];
|
||
$tabbar_items = $has_settings ? \Jio\Settings\Settings::get_footer_tabbar_items() : [];
|
||
$tabbar_enabled = !$jio_hide_chrome && !empty($tabbar_settings['enabled']) && !empty($tabbar_items);
|
||
?>
|
||
|
||
<?php if ($tabbar_enabled) :
|
||
$tabbar_use_single_extend = function_exists('jio_should_use_footer_tabbar_single_extend')
|
||
&& jio_should_use_footer_tabbar_single_extend();
|
||
?>
|
||
<div class="footer-tabbar-placeholder" aria-hidden="true"></div>
|
||
<nav id="footer-tabbar" class="footer-tabbar<?php echo !empty($tabbar_settings['animation']) ? ' has-animation' : ''; ?><?php echo !empty($tabbar_settings['scroll_down_hide']) ? ' scroll-down-hide' : ''; ?><?php echo empty($tabbar_settings['border']) ? ' no-border' : ''; ?><?php echo empty($tabbar_settings['shadow']) ? ' no-shadow' : ''; ?><?php echo $tabbar_use_single_extend ? ' footer-tabbar--single-extend' : ''; ?>" aria-label="<?php esc_attr_e('底部导航', 'jio'); ?>">
|
||
<?php if ($tabbar_use_single_extend && function_exists('jio_render_footer_tabbar_single_extend')) :
|
||
jio_render_footer_tabbar_single_extend(!empty($tabbar_settings['show_text']));
|
||
else :
|
||
foreach ($tabbar_items as $tab_item) :
|
||
$tab_type = sanitize_key((string) ($tab_item['type'] ?? 'custom'));
|
||
$tab_text = (string) ($tab_item['text'] ?? '');
|
||
$tab_icon = (string) ($tab_item['icon'] ?? 'fa fas fa-circle');
|
||
$tab_href = home_url('/');
|
||
if ($tab_type === 'category') {
|
||
$tab_href = get_post_type_archive_link('post') ?: home_url('/');
|
||
} elseif ($tab_type === 'auth') {
|
||
$tab_href = is_user_logged_in() ? jio_get_user_center_url() : jio_get_login_url();
|
||
} elseif ($tab_type === 'search') {
|
||
$tab_href = home_url('/');
|
||
} elseif ($tab_type === 'custom' && !empty($tab_item['link'])) {
|
||
$tab_href = (string) $tab_item['link'];
|
||
} elseif ($tab_type === 'home') {
|
||
$tab_href = home_url('/');
|
||
}
|
||
?>
|
||
<a href="<?php echo esc_url($tab_href); ?>" class="tabbar-item" data-type="<?php echo esc_attr($tab_type); ?>">
|
||
<?php echo jio_icon_markup((string) $tab_icon); // pre-escaped ?>
|
||
<?php if (!empty($tabbar_settings['show_text'])) : ?><span><?php echo esc_html($tab_text); ?></span><?php endif; ?>
|
||
</a>
|
||
<?php endforeach;
|
||
endif; ?>
|
||
</nav>
|
||
<?php endif; ?>
|
||
|
||
<?php
|
||
// 弹窗登录/注册模板(仅未登录用户)
|
||
if (
|
||
!is_user_logged_in()
|
||
&& class_exists('\Jio\Settings\Settings')
|
||
&& \Jio\Settings\Settings::user_sign_type() === 'modal'
|
||
&& file_exists(JIO_DIR . '/templates/parts/modal-auth.php')
|
||
) {
|
||
include JIO_DIR . '/templates/parts/modal-auth.php';
|
||
}
|
||
?>
|
||
|
||
<?php wp_footer(); ?>
|
||
</html>
|