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
@@ -1,15 +1,15 @@
|
||||
(function ($, document) {
|
||||
function aksrt__(key) {
|
||||
var map = window.aksrt_admin_main_var && window.aksrt_admin_main_var.i18n;
|
||||
function jio__(key) {
|
||||
var map = window.jio_admin_main_var && window.jio_admin_main_var.i18n;
|
||||
if (map && Object.prototype.hasOwnProperty.call(map, key)) {
|
||||
return map[key];
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
function _aksrt_sprintf(key) {
|
||||
function _jio_sprintf(key) {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
var str = aksrt__(key);
|
||||
var str = jio__(key);
|
||||
var autoIndex = 0;
|
||||
return str.replace(/%(\d+\$)?s/g, function (match, num) {
|
||||
var idx = num ? parseInt(num, 10) - 1 : autoIndex++;
|
||||
@@ -61,56 +61,56 @@
|
||||
|
||||
$(document).ready(function ($) {
|
||||
//循环替换后台菜单名称
|
||||
var $shop_menu = $('#toplevel_page_aksrtpay_page');
|
||||
var $shop_menu = $('#toplevel_page_jiopay_page');
|
||||
if ($shop_menu.length && $('html').attr('lang') !== 'zh-Hans') {
|
||||
$shop_menu.find('.toplevel_page_aksrtpay_page .wp-menu-name').text(aksrt__('admin_menu_title_shop_center'));
|
||||
$shop_menu.find('.toplevel_page_jiopay_page .wp-menu-name').text(jio__('admin_menu_title_shop_center'));
|
||||
var $sub_menu = $shop_menu.find('.wp-submenu');
|
||||
$sub_menu.find('a.wp-first-item').text(aksrt__('admin_menu_title_shop_center'));
|
||||
$sub_menu.find('a.wp-first-item').text(jio__('admin_menu_title_shop_center'));
|
||||
$sub_menu.find('a').each(function () {
|
||||
var url = $(this).attr('href');
|
||||
//匹配以aksrtpay_page结尾
|
||||
if (url.endsWith('aksrtpay_page')) {
|
||||
$(this).text(aksrt__('admin_menu_title_shop_center'));
|
||||
//匹配以jiopay_page结尾
|
||||
if (url.endsWith('jiopay_page')) {
|
||||
$(this).text(jio__('admin_menu_title_shop_center'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_page#/order')) {
|
||||
$(this).text(aksrt__('admin_menu_title_order'));
|
||||
if (url.endsWith('jiopay_page#/order')) {
|
||||
$(this).text(jio__('admin_menu_title_order'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_page#/shipping')) {
|
||||
$(this).text(aksrt__('admin_menu_title_shipping'));
|
||||
if (url.endsWith('jiopay_page#/shipping')) {
|
||||
$(this).text(jio__('admin_menu_title_shipping'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_page#/after-sale')) {
|
||||
$(this).text(aksrt__('admin_menu_title_after_sale'));
|
||||
if (url.endsWith('jiopay_page#/after-sale')) {
|
||||
$(this).text(jio__('admin_menu_title_after_sale'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_income_page')) {
|
||||
$(this).text(aksrt__('admin_menu_title_income'));
|
||||
if (url.endsWith('jiopay_income_page')) {
|
||||
$(this).text(jio__('admin_menu_title_income'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_product_page')) {
|
||||
$(this).text(aksrt__('admin_menu_title_product'));
|
||||
if (url.endsWith('jiopay_product_page')) {
|
||||
$(this).text(jio__('admin_menu_title_product'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_charge_card_page')) {
|
||||
$(this).text(aksrt__('admin_menu_title_card'));
|
||||
if (url.endsWith('jiopay_charge_card_page')) {
|
||||
$(this).text(jio__('admin_menu_title_card'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_coupon_page')) {
|
||||
$(this).text(aksrt__('admin_menu_title_coupon'));
|
||||
if (url.endsWith('jiopay_coupon_page')) {
|
||||
$(this).text(jio__('admin_menu_title_coupon'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_withdraw')) {
|
||||
$(this).text(aksrt__('admin_menu_title_withdraw'));
|
||||
if (url.endsWith('jiopay_withdraw')) {
|
||||
$(this).text(jio__('admin_menu_title_withdraw'));
|
||||
}
|
||||
|
||||
if (url.endsWith('users.php')) {
|
||||
$(this).text(aksrt__('admin_menu_title_vip'));
|
||||
$(this).text(jio__('admin_menu_title_vip'));
|
||||
}
|
||||
|
||||
if (url.endsWith('aksrtpay_order_page')) {
|
||||
$(this).text(aksrt__('admin_menu_title_order_old'));
|
||||
if (url.endsWith('jiopay_order_page')) {
|
||||
$(this).text(jio__('admin_menu_title_order_old'));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -226,15 +226,15 @@
|
||||
_body.on('click', '[data-clipboard-text]', function () {
|
||||
var _this = $(this);
|
||||
var text = _this.attr('data-clipboard-text');
|
||||
var tag = _this.attr('data-clipboard-tag') || aksrt__('admin_content');
|
||||
var tag = _this.attr('data-clipboard-tag') || jio__('admin_content');
|
||||
|
||||
copyText(
|
||||
text,
|
||||
function () {
|
||||
notyf(_aksrt_sprintf('admin_copied', tag));
|
||||
notyf(_jio_sprintf('admin_copied', tag));
|
||||
},
|
||||
function () {
|
||||
notyf(_aksrt_sprintf('admin_copy_failed', tag), 'danger');
|
||||
notyf(_jio_sprintf('admin_copy_failed', tag), 'danger');
|
||||
},
|
||||
this
|
||||
);
|
||||
@@ -248,7 +248,7 @@
|
||||
var remote = _this.attr('data-remote');
|
||||
var height = _this.attr('data-height') || 200;
|
||||
var mobile_bottom = _this.attr('mobile-bottom') && $(window).width() < 769 ? ' bottom' : '';
|
||||
var modal_class = 'aksrt-modal flex jc fade' + mobile_bottom;
|
||||
var modal_class = 'jio-modal flex jc fade' + mobile_bottom;
|
||||
var id = 'refresh_modal';
|
||||
var is_new = _this.attr('new');
|
||||
id += is_new ? parseInt((Math.random() + 1) * Math.pow(10, 4)) : '';
|
||||
@@ -260,30 +260,30 @@
|
||||
remote = ajax_url + '?action=' + action;
|
||||
}
|
||||
|
||||
dataclass += ' aksrt-modal-dialog';
|
||||
dataclass += ' jio-modal-dialog';
|
||||
var modal_html =
|
||||
'<div class="' +
|
||||
modal_class +
|
||||
'" id="' +
|
||||
id +
|
||||
'" tabindex="-1" role="dialog" aria-hidden="false">\
|
||||
<div class="aksrt-modal-backdrop"></div><div class="' +
|
||||
<div class="jio-modal-backdrop"></div><div class="' +
|
||||
dataclass +
|
||||
'" role="document"><div class="hide-btn dashicons dashicons-no-alt"></div>\
|
||||
<div class="aksrt-modal-content"></div>\
|
||||
<div class="jio-modal-content"></div>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
var loading = '<div class="aksrt-modal-body" style="display:none;"></div><div class="flex jc loading-mask absolute main-bg radius8"><div class="em2x opacity5"><i class="rotate-loading"></i></div></div>';
|
||||
var loading = '<div class="jio-modal-body" style="display:none;"></div><div class="flex jc loading-mask absolute main-bg radius8"><div class="em2x opacity5"><i class="rotate-loading"></i></div></div>';
|
||||
|
||||
var _modal = $(_id);
|
||||
if (_modal.length) {
|
||||
if (_modal.hasClass('in')) modal_class += ' in';
|
||||
_modal.removeClass().addClass(modal_class);
|
||||
_modal.find('.aksrt-modal-dialog').removeClass().addClass(dataclass);
|
||||
_modal.find('.jio-modal-dialog').removeClass().addClass(dataclass);
|
||||
_modal.find('.loading-mask').fadeIn(200);
|
||||
_modal
|
||||
.find('.aksrt-modal-content')
|
||||
.find('.jio-modal-content')
|
||||
.css({
|
||||
overflow: 'hidden',
|
||||
})
|
||||
@@ -298,29 +298,29 @@
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
_modal.find('.aksrt-modal-content').html(loading).css({
|
||||
_modal.find('.jio-modal-content').html(loading).css({
|
||||
height: height,
|
||||
overflow: 'hidden',
|
||||
});
|
||||
}
|
||||
|
||||
_modal.aksrt_modal('show');
|
||||
_modal.jio_modal('show');
|
||||
|
||||
$.get(remote, null, function (data) {
|
||||
_modal
|
||||
.find('.aksrt-modal-body')
|
||||
.find('.jio-modal-body')
|
||||
.html(data)
|
||||
.slideDown(200, function () {
|
||||
_modal.trigger('loaded.modal').find('.loading-mask').fadeOut(200);
|
||||
var b_height = $(this).outerHeight();
|
||||
_modal.find('.aksrt-modal-content').animate(
|
||||
_modal.find('.jio-modal-content').animate(
|
||||
{
|
||||
height: b_height,
|
||||
},
|
||||
200,
|
||||
'swing',
|
||||
function () {
|
||||
_modal.find('.aksrt-modal-content').css({
|
||||
_modal.find('.jio-modal-content').css({
|
||||
height: '',
|
||||
overflow: '',
|
||||
transition: '',
|
||||
@@ -333,7 +333,7 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$.fn.aksrt_modal = function ($action) {
|
||||
$.fn.jio_modal = function ($action) {
|
||||
var _this = $(this);
|
||||
switch ($action) {
|
||||
case 'show': {
|
||||
@@ -360,16 +360,16 @@
|
||||
}, 300);
|
||||
}
|
||||
|
||||
if (!_body.data('aksrt-modal-is-on')) {
|
||||
_body.on('click', '.aksrt-modal-backdrop,.hide-btn', function () {
|
||||
$($(this).parents('.aksrt-modal.in')[0]).aksrt_modal('hide');
|
||||
if (!_body.data('jio-modal-is-on')) {
|
||||
_body.on('click', '.jio-modal-backdrop,.hide-btn', function () {
|
||||
$($(this).parents('.jio-modal.in')[0]).jio_modal('hide');
|
||||
});
|
||||
_body.data('aksrt-modal-is-on', true);
|
||||
_body.data('jio-modal-is-on', true);
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------TAB-栏目--------------------------
|
||||
_body.on('click', '.aksrt-tab-toggle', function () {
|
||||
_body.on('click', '.jio-tab-toggle', function () {
|
||||
var _this = $(this);
|
||||
var tab_id = _this.attr('tab-id');
|
||||
if (_this.parent().hasClass('active')) return;
|
||||
@@ -392,13 +392,13 @@
|
||||
|
||||
//佣金确认
|
||||
_body.on('click', '.process-submit', function () {
|
||||
return confirm(aksrt__('admin_confirm_process'));
|
||||
return confirm(jio__('admin_confirm_process'));
|
||||
});
|
||||
|
||||
//--------------------为后台设置:修改网站URL地方添加说明------------------------
|
||||
var admin_options_url_input = $('.options-general-php input#siteurl');
|
||||
if (admin_options_url_input.length) {
|
||||
var html = '<div class="flex ac admin-url-set-warning" style="color: #e13535;background: #fbedea;padding: 10px;border-radius: 6px;border: 1px solid #ffbdbd;margin-top: 6px;"><span class="mb6 em2x mr20 dashicons dashicons-warning"></span><div>' + aksrt__('admin_url_warning') + '<br><a target="_blank" href="""">' + aksrt__('admin_url_tutorial') + '</a> | <a target="_blank" href="""">' + aksrt__('admin_url_plugin') + '</a></div></div>';
|
||||
var html = '<div class="flex ac admin-url-set-warning" style="color: #e13535;background: #fbedea;padding: 10px;border-radius: 6px;border: 1px solid #ffbdbd;margin-top: 6px;"><span class="mb6 em2x mr20 dashicons dashicons-warning"></span><div>' + jio__('admin_url_warning') + '<br><a target="_blank" href="""">' + jio__('admin_url_tutorial') + '</a> | <a target="_blank" href="""">' + jio__('admin_url_plugin') + '</a></div></div>';
|
||||
admin_options_url_input.after(html);
|
||||
}
|
||||
|
||||
@@ -406,38 +406,38 @@
|
||||
var show_on_front_input = $('input[name="show_on_front"]:eq(0)');
|
||||
if (show_on_front_input.length) {
|
||||
var parent = show_on_front_input.parent();
|
||||
parent.html(parent.html().replace('您的最新文章', aksrt__('admin_home_latest_posts')));
|
||||
parent.html(parent.html().replace('您的最新文章', jio__('admin_home_latest_posts')));
|
||||
|
||||
var page_for_posts = $('select[name="page_for_posts"]:eq(0)');
|
||||
if (page_for_posts.length) {
|
||||
var page_for_posts_parent = page_for_posts.parent();
|
||||
page_for_posts_parent
|
||||
.html(page_for_posts_parent.html().replace('文章页:', aksrt__('admin_home_posts_page')))
|
||||
.html(page_for_posts_parent.html().replace('文章页:', jio__('admin_home_posts_page')))
|
||||
.parent()
|
||||
.append('<p class="description em09">' + aksrt__('admin_home_posts_page_desc') + '</p>');
|
||||
.append('<p class="description em09">' + jio__('admin_home_posts_page_desc') + '</p>');
|
||||
}
|
||||
|
||||
var posts_per_page = $('[for="posts_per_page"]:eq(0)');
|
||||
if (posts_per_page.length) {
|
||||
posts_per_page
|
||||
.html(posts_per_page.html().replace('博客页面至多显示', aksrt__('admin_posts_per_page')))
|
||||
.html(posts_per_page.html().replace('博客页面至多显示', jio__('admin_posts_per_page')))
|
||||
.parent()
|
||||
.next()
|
||||
.append('<p class="description em09">' + aksrt__('admin_posts_per_page_desc') + '</p>');
|
||||
.append('<p class="description em09">' + jio__('admin_posts_per_page_desc') + '</p>');
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------为后台菜单:添加说明------------------------
|
||||
var menu_edit_instructions = $('.menu-edit .drag-instructions');
|
||||
if (menu_edit_instructions.length) {
|
||||
var menu_edit_desc = '<div class="c-yellow">' + aksrt__('admin_menu_pc_warning') + '</div><div class="">' + aksrt__('admin_menu_mobile_hint') + '</div>';
|
||||
var menu_edit_desc = '<div class="c-yellow">' + jio__('admin_menu_pc_warning') + '</div><div class="">' + jio__('admin_menu_mobile_hint') + '</div>';
|
||||
menu_edit_instructions.append(menu_edit_desc);
|
||||
}
|
||||
|
||||
//----------后台固定链接配置:添加说明-----------
|
||||
var permalink_tags_box = $('.permalink-structure .available-structure-tags');
|
||||
if (permalink_tags_box.length) {
|
||||
permalink_tags_box.append('<div class="mt10 c-blue">' + aksrt__('admin_permalink_recommend') + '</div><div class="mt10 c-yellow mb10">' + aksrt__('admin_permalink_rewrite') + '</div><button type="submit" style="cursor: pointer;" class="but jb-blue permalink-structure-auto-btn">' + aksrt__('admin_permalink_auto_save') + '</button>');
|
||||
permalink_tags_box.append('<div class="mt10 c-blue">' + jio__('admin_permalink_recommend') + '</div><div class="mt10 c-yellow mb10">' + jio__('admin_permalink_rewrite') + '</div><button type="submit" style="cursor: pointer;" class="but jb-blue permalink-structure-auto-btn">' + jio__('admin_permalink_auto_save') + '</button>');
|
||||
}
|
||||
|
||||
_body.on('click', '.permalink-structure-auto-btn', function () {
|
||||
|
||||
Reference in new issue
Block a user