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

@@ -2,7 +2,7 @@
/** Render thumbnail settings and image markup without a WordPress installation. */
declare(strict_types=1);
namespace AKSRT\Settings {
namespace Jio\Settings {
final class Settings {
public static array $values = [];
public static function get_all(): array { return self::$values; }
@@ -23,7 +23,7 @@ namespace AKSRT\Settings {
}
}
namespace AKSRT\Core {
namespace Jio\Core {
final class PostMetaBox {
public static array $meta = [];
public static function get_meta_value(int $id, string $key, $default = '') { return self::$meta[$key] ?? $default; }
@@ -53,11 +53,11 @@ namespace {
function get_post_field($field, $id, $context = ''): string { return $GLOBALS['post_content']; }
function get_the_category($id): array { return []; }
function get_post_format($id = null) { return false; }
function aksrt_get_lazy_thumb($size = ''): string { return 'https://example.test/placeholder.svg'; }
function aksrt_is_lazy($key): bool { return $key === 'lazy_sider'; }
function aksrt_get_lazy_attr($key, $src, $class = ''): string {
if (aksrt_is_lazy($key)) {
return ' class="lazyload ' . esc_attr($class) . '" src="' . aksrt_get_lazy_thumb() . '" data-src="' . esc_url($src) . '"';
function jio_get_lazy_thumb($size = ''): string { return 'https://example.test/placeholder.svg'; }
function jio_is_lazy($key): bool { return $key === 'lazy_sider'; }
function jio_get_lazy_attr($key, $src, $class = ''): string {
if (jio_is_lazy($key)) {
return ' class="lazyload ' . esc_attr($class) . '" src="' . jio_get_lazy_thumb() . '" data-src="' . esc_url($src) . '"';
}
return ' class="' . esc_attr($class) . '" src="' . esc_url($src) . '"';
}
@@ -69,41 +69,41 @@ namespace {
$styles = [];
foreach (['defaults' => [], 'custom' => ['list_list_option' => ['scale' => 100], 'list_card_option' => ['scale' => 56]], 'bounds' => ['list_list_option' => ['scale' => 1], 'list_card_option' => ['scale' => 900]]] as $name => $values) {
\AKSRT\Settings\Settings::$values = $values;
\Jio\Settings\Settings::$values = $values;
ob_start();
(new \AKSRT\Frontend\InlineStyleBuilder())->output();
(new \Jio\Frontend\InlineStyleBuilder())->output();
$styles[$name] = (string) ob_get_clean();
}
$GLOBALS['featured_id'] = 42;
$GLOBALS['post_content'] = '<p><img src="https://example.test/content.jpg"></p>';
\AKSRT\Core\PostMetaBox::$meta = ['thumbnail_url' => 'https://example.test/external.jpg'];
\Jio\Core\PostMetaBox::$meta = ['thumbnail_url' => 'https://example.test/external.jpg'];
$cfg = ['thumb' => ['thumb_postfirstimg_size' => 'large', 'thumb_postfirstimg_s' => true, 'spare_thumbnail' => ['https://example.test/spare.jpg']]];
$featured = aksrt_renderer_resolve_images(1, $cfg);
$featured = jio_renderer_resolve_images(1, $cfg);
$GLOBALS['featured_id'] = 999;
$external = aksrt_renderer_resolve_images(1, $cfg);
\AKSRT\Core\PostMetaBox::$meta = [];
$content = aksrt_renderer_resolve_images(1, $cfg);
$external = jio_renderer_resolve_images(1, $cfg);
\Jio\Core\PostMetaBox::$meta = [];
$content = jio_renderer_resolve_images(1, $cfg);
$GLOBALS['post_content'] = '';
$spare = aksrt_renderer_resolve_images(1, $cfg);
\AKSRT\Core\PostMetaBox::$meta = ['featured_slide' => '999,42'];
$slides = aksrt_renderer_curated_images(1, 'medium');
$spare = jio_renderer_resolve_images(1, $cfg);
\Jio\Core\PostMetaBox::$meta = ['featured_slide' => '999,42'];
$slides = jio_renderer_curated_images(1, 'medium');
$data = [
'post_id' => 1, 'primary' => $featured['primary'], 'has_real' => true,
'permalink' => 'https://example.test/post/', 'title' => 'Featured image',
'video_url' => '', 'slides' => [], 'gallery_count' => 0,
];
$cover = aksrt_renderer_thumb($data, ['thumb' => ['list_thumb_fit' => '']]);
$contain = aksrt_renderer_thumb($data, ['thumb' => ['list_thumb_fit' => 'contain']]);
$cover = jio_renderer_thumb($data, ['thumb' => ['list_thumb_fit' => '']]);
$contain = jio_renderer_thumb($data, ['thumb' => ['list_thumb_fit' => 'contain']]);
$data['is_slide'] = true;
$data['slides'] = ['https://example.test/slide.jpg'];
$single = aksrt_renderer_thumb($data, ['thumb' => []]);
\AKSRT\Core\PostMetaBox::$meta = ['featured_slide' => implode(',', array_fill(0, 12, '42'))];
$data['slides'] = aksrt_renderer_curated_images(1, 'large');
$multiple = aksrt_renderer_thumb($data, ['thumb' => ['list_thumb_fit' => 'contain']]);
$single = jio_renderer_thumb($data, ['thumb' => []]);
\Jio\Core\PostMetaBox::$meta = ['featured_slide' => implode(',', array_fill(0, 12, '42'))];
$data['slides'] = jio_renderer_curated_images(1, 'large');
$multiple = jio_renderer_thumb($data, ['thumb' => ['list_thumb_fit' => 'contain']]);
$data['video_url'] = 'https://example.test/movie.mp4';
$video = aksrt_renderer_thumb($data, ['thumb' => ['list_thumb_video_s' => true, 'list_thumb_video_mute_s' => true]]);
$video = jio_renderer_thumb($data, ['thumb' => ['list_thumb_video_s' => true, 'list_thumb_video_mute_s' => true]]);
echo json_encode(compact('styles', 'featured', 'external', 'content', 'spare', 'slides', 'cover', 'contain', 'single', 'multiple', 'video'), JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES);
}