refactor: rename the theme brand and every identifier from AKSRT to Jio
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>
This commit is contained in:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
+35
-35
@@ -4,22 +4,22 @@
|
||||
*
|
||||
* 主内容区对齐 legacy `legacy` 契约;浮动按钮与移动端 tabbar 保留。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
* @version 4.1.0
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
// 数据准备
|
||||
$blog_name = function_exists('aksrt_get_site_logo_text') ? aksrt_get_site_logo_text() : get_bloginfo('name');
|
||||
$has_settings = class_exists('\AKSRT\Settings\Settings');
|
||||
$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 ? \AKSRT\Settings\Settings::get_footer_brand_settings() : ['m_s' => ['pc', 'mobile'], 'img' => '', 'img_dark' => '', 'title' => '', 'custom_code' => ''];
|
||||
$footer_contact_ext = $has_settings ? \AKSRT\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 ? \AKSRT\Settings\Settings::get_footer_mini_img_settings() : ['m_s' => ['pc', 'mobile'], 'items' => [], 'items_2' => []];
|
||||
$footer_customize_code = $has_settings ? \AKSRT\Settings\Settings::get_footer_customize_code() : '';
|
||||
$footer_template = $has_settings ? \AKSRT\Settings\Settings::get_footer_template() : 'template_1';
|
||||
$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);
|
||||
@@ -31,8 +31,8 @@ $_mini_xs_cls = $_mini_show_sm ? '' : ' hidden-xs';
|
||||
|
||||
// 品牌 / 联系 / 二维码列内容存在性
|
||||
$_logo_html = '';
|
||||
if (function_exists('aksrt_get_adaptive_theme_img')) {
|
||||
$_logo_html = aksrt_get_adaptive_theme_img(
|
||||
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,
|
||||
@@ -61,9 +61,9 @@ $_footer_conter = wp_kses_post(trim((string) $footer_customize_code));
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php \AKSRT\WidgetSystem\WidgetAreas::render('all_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
<?php \Jio\WidgetSystem\WidgetAreas::render('all_bottom_fluid', 'fluid-widget-wrap'); ?>
|
||||
|
||||
<footer class="footer" data-aksrt-shell="site-footer" data-footer-template="<?php echo esc_attr($footer_template); ?>" role="contentinfo">
|
||||
<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; ?>
|
||||
@@ -102,25 +102,25 @@ $_footer_conter = wp_kses_post(trim((string) $footer_customize_code));
|
||||
<?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('微信', 'aksrt'); ?>">
|
||||
<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('微信', 'aksrt'); ?>">
|
||||
<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', 'aksrt'); ?>" href="<?php echo esc_url('https://wpa.qq.com/msgrd?v=3&uin=' . rawurlencode((string) $footer_contact_ext['qq']) . '&site=qq&menu=yes'); ?>">
|
||||
<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('微博', 'aksrt'); ?>" href="<?php echo esc_url($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('邮箱', 'aksrt'); ?>" href="<?php echo esc_url('mailto:' . $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; ?>
|
||||
@@ -132,7 +132,7 @@ $_footer_conter = wp_kses_post(trim((string) $footer_customize_code));
|
||||
$m_url = (string) ($more_item['link'] ?? '');
|
||||
$m_text = (string) ($more_item['desc'] ?? '');
|
||||
$m_icon = (string) ($more_item['icon'] ?? '');
|
||||
$m_icon_html = $m_icon !== '' ? aksrt_icon_markup($m_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>';
|
||||
}
|
||||
@@ -171,7 +171,7 @@ $_footer_conter = wp_kses_post(trim((string) $footer_customize_code));
|
||||
<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 aksrt_get_lazy_attr('lazy_other', $mi_img); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> alt="<?php echo esc_attr($mi_text !== '' ? $mi_text : $blog_name); ?>">
|
||||
<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; ?>
|
||||
@@ -196,21 +196,21 @@ $_footer_conter = wp_kses_post(trim((string) $footer_customize_code));
|
||||
|
||||
|
||||
<?php
|
||||
// 右侧悬浮按钮由 aksrt_float_right() 挂 wp_footer 输出(inc/helpers/aksrt-float-buttons.php)。
|
||||
$aksrt_hide_chrome = is_page_template('templates/pages/page-submit.php');
|
||||
$tabbar_settings = $has_settings ? \AKSRT\Settings\Settings::get_footer_tabbar_settings() : [];
|
||||
$tabbar_items = $has_settings ? \AKSRT\Settings\Settings::get_footer_tabbar_items() : [];
|
||||
$tabbar_enabled = !$aksrt_hide_chrome && !empty($tabbar_settings['enabled']) && !empty($tabbar_items);
|
||||
// 右侧悬浮按钮由 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('aksrt_should_use_footer_tabbar_single_extend')
|
||||
&& aksrt_should_use_footer_tabbar_single_extend();
|
||||
$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('底部导航', 'aksrt'); ?>">
|
||||
<?php if ($tabbar_use_single_extend && function_exists('aksrt_render_footer_tabbar_single_extend')) :
|
||||
aksrt_render_footer_tabbar_single_extend(!empty($tabbar_settings['show_text']));
|
||||
<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'));
|
||||
@@ -220,7 +220,7 @@ $tabbar_enabled = !$aksrt_hide_chrome && !empty($tabbar_settings['enabled'])
|
||||
if ($tab_type === 'category') {
|
||||
$tab_href = get_post_type_archive_link('post') ?: home_url('/');
|
||||
} elseif ($tab_type === 'auth') {
|
||||
$tab_href = is_user_logged_in() ? aksrt_get_user_center_url() : aksrt_get_login_url();
|
||||
$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'])) {
|
||||
@@ -230,7 +230,7 @@ $tabbar_enabled = !$aksrt_hide_chrome && !empty($tabbar_settings['enabled'])
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo esc_url($tab_href); ?>" class="tabbar-item" data-type="<?php echo esc_attr($tab_type); ?>">
|
||||
<?php echo aksrt_icon_markup((string) $tab_icon); // pre-escaped ?>
|
||||
<?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;
|
||||
@@ -242,11 +242,11 @@ $tabbar_enabled = !$aksrt_hide_chrome && !empty($tabbar_settings['enabled'])
|
||||
// 弹窗登录/注册模板(仅未登录用户)
|
||||
if (
|
||||
!is_user_logged_in()
|
||||
&& class_exists('\AKSRT\Settings\Settings')
|
||||
&& \AKSRT\Settings\Settings::user_sign_type() === 'modal'
|
||||
&& file_exists(AKSRT_DIR . '/templates/parts/modal-auth.php')
|
||||
&& class_exists('\Jio\Settings\Settings')
|
||||
&& \Jio\Settings\Settings::user_sign_type() === 'modal'
|
||||
&& file_exists(JIO_DIR . '/templates/parts/modal-auth.php')
|
||||
) {
|
||||
include AKSRT_DIR . '/templates/parts/modal-auth.php';
|
||||
include JIO_DIR . '/templates/parts/modal-auth.php';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Reference in new issue
Block a user