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,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Reversible WP-CLI visual fixtures for AKSRT/Zibll comparison.
|
||||
* Reversible WP-CLI visual fixtures for Jio/Zibll comparison.
|
||||
*
|
||||
* Usage:
|
||||
* wp eval-file wp-content/themes/AKSRT-theme/tools/wp-cli-visual-fixtures.php create
|
||||
* wp eval-file wp-content/themes/AKSRT-theme/tools/wp-cli-visual-fixtures.php cleanup
|
||||
* wp eval-file wp-content/themes/Jio-theme/tools/wp-cli-visual-fixtures.php create
|
||||
* wp eval-file wp-content/themes/Jio-theme/tools/wp-cli-visual-fixtures.php cleanup
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -16,8 +16,8 @@ if (!defined('WP_CLI') || !WP_CLI) {
|
||||
}
|
||||
|
||||
$fixture_action = sanitize_key((string) ($args[0] ?? ''));
|
||||
$fixture_option = 'aksrt_visual_fixture_manifest_v1';
|
||||
$fixture_prefix = 'aksrt_zibll_v1_';
|
||||
$fixture_option = 'jio_visual_fixture_manifest_v1';
|
||||
$fixture_prefix = 'jio_zibll_v1_';
|
||||
$fixture_theme_dir = dirname(__DIR__);
|
||||
$fixture_json = $fixture_theme_dir . '/tests/fixtures/widget-golden-v1.json';
|
||||
|
||||
@@ -72,11 +72,11 @@ $cleanup = static function (array $manifest) use ($fixture_option): void {
|
||||
$existing = get_option($fixture_option, []);
|
||||
if ($fixture_action === 'cleanup') {
|
||||
if (!is_array($existing) || empty($existing)) {
|
||||
WP_CLI::success('No AKSRT visual fixtures found.');
|
||||
WP_CLI::success('No Jio visual fixtures found.');
|
||||
return;
|
||||
}
|
||||
$cleanup($existing);
|
||||
WP_CLI::success('AKSRT visual fixtures removed.');
|
||||
WP_CLI::success('Jio visual fixtures removed.');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ try {
|
||||
$login = $fixture_prefix . 'user_' . ((int) $index + 1);
|
||||
$user_id = wp_insert_user([
|
||||
'user_login' => $login,
|
||||
'user_pass' => 'AKSRT-Visual-2026!',
|
||||
'user_pass' => 'Jio-Visual-2026!',
|
||||
'user_email' => $login . '@example.test',
|
||||
'display_name' => (string) ($source['name'] ?? $login),
|
||||
'role' => 'subscriber',
|
||||
@@ -137,10 +137,10 @@ try {
|
||||
$user_id = (int) $user_id;
|
||||
$user_map[(int) ($source['id'] ?? 0)] = $user_id;
|
||||
$manifest['users'][] = $user_id;
|
||||
update_user_meta($user_id, 'aksrt_points', (int) ($source['points'] ?? 0));
|
||||
update_user_meta($user_id, 'jio_points', (int) ($source['points'] ?? 0));
|
||||
if ($index === 0) {
|
||||
update_user_meta($user_id, 'aksrt_vip_level', 2);
|
||||
update_user_meta($user_id, 'aksrt_vip_expires', time() + YEAR_IN_SECONDS);
|
||||
update_user_meta($user_id, 'jio_vip_level', 2);
|
||||
update_user_meta($user_id, 'jio_vip_expires', time() + YEAR_IN_SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ try {
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'post',
|
||||
'post_author' => (int) ($user_map[(int) ($source['author'] ?? 0)] ?? 1),
|
||||
'post_excerpt' => '用于 AKSRT 与 Zibll 同内容视觉比较的固定摘要。',
|
||||
'post_excerpt' => '用于 Jio 与 Zibll 同内容视觉比较的固定摘要。',
|
||||
'post_content' => '<h2>视觉基线标题</h2><p>固定正文内容,用于检查排版、目录、付费状态和响应式布局。</p>',
|
||||
], true);
|
||||
if (is_wp_error($post_id)) {
|
||||
@@ -198,14 +198,14 @@ try {
|
||||
set_post_thumbnail($post_id, (int) $manifest['attachments'][$index % count($manifest['attachments'])]);
|
||||
}
|
||||
$pay_type = sanitize_key((string) ($source['pay_type'] ?? 'no'));
|
||||
$pay = class_exists('AKSRT\\Core\\DomainModel') ? \AKSRT\Core\DomainModel::default_pay_meta() : [];
|
||||
$pay = class_exists('Jio\\Core\\DomainModel') ? \Jio\Core\DomainModel::default_pay_meta() : [];
|
||||
$pay['pay_type'] = $pay_type;
|
||||
$pay['price'] = $pay_type === 'no' ? 0 : 19.9 + $index;
|
||||
$pay['pay_limit'] = $pay_type === 'vip' ? 1 : 0;
|
||||
update_post_meta($post_id, '_aksrt_pay', $pay);
|
||||
update_post_meta($post_id, '_aksrt_pay_type', $pay_type);
|
||||
update_post_meta($post_id, '_aksrt_pay_price', $pay['price']);
|
||||
update_post_meta($post_id, 'aksrt_post_views', 1200 + ($index * 137));
|
||||
update_post_meta($post_id, '_jio_pay', $pay);
|
||||
update_post_meta($post_id, '_jio_pay_type', $pay_type);
|
||||
update_post_meta($post_id, '_jio_pay_price', $pay['price']);
|
||||
update_post_meta($post_id, 'jio_post_views', 1200 + ($index * 137));
|
||||
}
|
||||
|
||||
$no_image = wp_insert_post([
|
||||
@@ -248,7 +248,7 @@ try {
|
||||
}
|
||||
wp_set_sidebars_widgets($sidebars);
|
||||
update_option($fixture_option, $manifest, false);
|
||||
WP_CLI::success('Created reversible AKSRT visual fixtures. Login password: AKSRT-Visual-2026!');
|
||||
WP_CLI::success('Created reversible Jio visual fixtures. Login password: Jio-Visual-2026!');
|
||||
} catch (Throwable $error) {
|
||||
$cleanup($manifest);
|
||||
WP_CLI::error('Fixture creation rolled back: ' . $error->getMessage());
|
||||
|
||||
Reference in new issue
Block a user