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:
kate522andClaude Opus 5 committed 2026-11-01 20:05:04 +08:00
1 parent 5b16bc6e15
commit 35bb96e82f
997 files changed
+28216 -28188

No files matched your search

@@ -143,9 +143,9 @@ namespace {
function fp_attachment(int $id, int $author = 7, string $mime = 'image/jpeg', int $parent = 0, string $status = 'inherit', bool $pending = true, ?string $kind = 'image'): WP_Post {
$post = fp_post($id, 'attachment', $author, $status, '', $parent, $mime);
if ($kind !== null) update_post_meta($id, '_aksrt_front_submit_media', $kind);
if ($kind !== null) update_post_meta($id, '_jio_front_submit_media', $kind);
$GLOBALS['front_pending_state']['url_map']['https://example.test/uploads/media-' . $id . '.' . fp_ext($mime)] = $id;
if ($pending) \AKSRT\Attachment\PendingUploads::mark($id);
if ($pending) \Jio\Attachment\PendingUploads::mark($id);
return $post;
}
@@ -156,7 +156,7 @@ namespace {
}
function fp_pending(int $id): bool {
return get_post_meta($id, \AKSRT\Attachment\PendingUploads::META, true) !== '';
return get_post_meta($id, \Jio\Attachment\PendingUploads::META, true) !== '';
}
function fp_article_data(string $content, array $extra = []): array {
@@ -265,7 +265,7 @@ namespace {
}
return $id;
}
function aksrt_get_pay_meta($post_id): array {
function jio_get_pay_meta($post_id): array {
return $GLOBALS['front_pending_state']['pay_meta'][(int) $post_id] ?? [];
}
function attachment_url_to_postid($url): int {
@@ -343,10 +343,10 @@ namespace {
require_once dirname(__DIR__, 2) . '/src/Core/FrontSubmit.php';
}
namespace AKSRT\Core {
namespace Jio\Core {
final class DomainModel {
public const PAY_META_KEY = '_aksrt_pay';
public const POST_META_KEY = 'aksrt_post_meta';
public const PAY_META_KEY = '_jio_pay';
public const POST_META_KEY = 'jio_post_meta';
}
final class FrontSubmitPendingProbe {
@@ -397,7 +397,7 @@ namespace AKSRT\Core {
}
}
namespace AKSRT\User {
namespace Jio\User {
final class Restriction {
private static ?self $instance = null;
public static function get_instance(): self { return self::$instance ??= new self(); }
@@ -407,10 +407,10 @@ namespace AKSRT\User {
}
namespace {
use AKSRT\Attachment\PendingUploads;
use AKSRT\Core\FrontSubmit;
use AKSRT\Core\FrontSubmitPendingProbe;
use AKSRT\Core\DomainModel;
use Jio\Attachment\PendingUploads;
use Jio\Core\FrontSubmit;
use Jio\Core\FrontSubmitPendingProbe;
use Jio\Core\DomainModel;
$submit = new FrontSubmitPendingProbe();
@@ -427,7 +427,7 @@ namespace {
fp_assert($response instanceof \WP_REST_Response && $response->get_status() === 201, 'real upload persistence should return a created response');
$id = (int) ($response->get_data()['attachment_id'] ?? 0);
fp_assert($id > 0 && fp_pending($id), 'each normalized upload must be marked pending');
fp_assert(($GLOBALS['front_pending_state']['post_meta'][$id]['_aksrt_front_submit_media'] ?? '') === 'resource', 'upload should retain the normalized media type');
fp_assert(($GLOBALS['front_pending_state']['post_meta'][$id]['_jio_front_submit_media'] ?? '') === 'resource', 'upload should retain the normalized media type');
}
fp_assert(count($GLOBALS['front_pending_state']['upload_calls']) === 2, 'single and sideload calls should each persist once');
fp_assert(empty($GLOBALS['front_pending_state']['upload_calls'][0]['overrides']['action']), 'ordinary upload should use the upload action');
@@ -477,7 +477,7 @@ namespace {
$content = 'Draft body with enough text for a save. '
. '<img data-edit-file-id="100" src="/image.jpg">'
. '<video data-edit-file-id="101" data-video-url="https://video.example.test/movie.mp4"></video>'
. '<a data-aksrt-file-id="102" href="/resource.pdf">resource</a>'
. '<a data-jio-file-id="102" href="/resource.pdf">resource</a>'
. implode(' ', $body_urls);
$result = $submit->persist(fp_article_data($content, [
'fake_saved_pay_meta' => ['downloads' => $pay_downloads],
@@ -534,7 +534,7 @@ namespace {
fp_assert(!empty($removed['success']), 'edit removing a media reference should save');
fp_assert(isset($GLOBALS['front_pending_state']['posts'][441]), 'unreferenced attached media must not be deleted');
fp_assert($GLOBALS['front_pending_state']['posts'][441]->post_parent === 0, 'removed media should be detached from the edited post');
fp_assert(get_post_meta(441, '_aksrt_front_submit_media', true) === '', 'removed media should lose only its submit relation marker');
fp_assert(get_post_meta(441, '_jio_front_submit_media', true) === '', 'removed media should lose only its submit relation marker');
fp_assert(!fp_pending(441) && $GLOBALS['front_pending_state']['deleted'] === [], 'removed media must not be deleted or marked pending again');
// A payment validation error happens after the body write. The saved body is