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,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace AKSRT\WidgetSystem;
|
||||
namespace Jio\WidgetSystem;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
@@ -56,33 +56,33 @@ final class FrontendRenderer {
|
||||
echo (string) ($args['after_widget'] ?? '');
|
||||
return;
|
||||
}
|
||||
$classes = ['aksrt-widget', 'aksrt-panel-wrap', 'aksrt-widget--' . $definition->slug(), 'aksrt-widget--' . $definition->size()];
|
||||
$classes = ['jio-widget', 'jio-panel-wrap', 'jio-widget--' . $definition->slug(), 'jio-widget--' . $definition->size()];
|
||||
if ($definition->size() === 'sidebar') {
|
||||
$classes[] = 'aksrt-panel';
|
||||
$classes[] = 'jio-panel';
|
||||
}
|
||||
$device_class = WidgetVisibility::device_class($instance);
|
||||
if ($device_class !== '') {
|
||||
$classes[] = $device_class;
|
||||
}
|
||||
if (!empty($instance['sidebar_affix'])) {
|
||||
$classes[] = 'aksrt-widget--affix';
|
||||
$classes[] = 'jio-widget--affix';
|
||||
}
|
||||
if (!empty($instance['animation_in'])) {
|
||||
$classes[] = 'aksrt-widget--animate';
|
||||
$classes[] = 'aksrt-widget--animate-' . sanitize_html_class((string) $instance['animation_in']);
|
||||
$classes[] = 'jio-widget--animate';
|
||||
$classes[] = 'jio-widget--animate-' . sanitize_html_class((string) $instance['animation_in']);
|
||||
}
|
||||
if (!empty($instance['animation_repeat'])) {
|
||||
$classes[] = 'aksrt-widget--animate-repeat';
|
||||
$classes[] = 'jio-widget--animate-repeat';
|
||||
}
|
||||
|
||||
$style = self::style($instance);
|
||||
echo (string) ($args['before_widget'] ?? '<section>'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<div class="' . esc_attr(implode(' ', $classes)) . '" data-aksrt-widget="' . esc_attr($definition->slug()) . '" data-widget-id="' . esc_attr((string) $widget->id) . '"' . ($style !== '' ? ' style="' . esc_attr($style) . '"' : '') . '>';
|
||||
echo '<div class="' . esc_attr(implode(' ', $classes)) . '" data-jio-widget="' . esc_attr($definition->slug()) . '" data-widget-id="' . esc_attr((string) $widget->id) . '"' . ($style !== '' ? ' style="' . esc_attr($style) . '"' : '') . '>';
|
||||
if ($definition->size() !== 'sidebar') {
|
||||
echo '<div class="aksrt-widget__inner container">';
|
||||
echo '<div class="jio-widget__inner container">';
|
||||
}
|
||||
echo self::title($instance); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<div class="aksrt-widget__content">' . $content . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<div class="jio-widget__content">' . $content . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
if ($definition->size() !== 'sidebar') {
|
||||
echo '</div>';
|
||||
}
|
||||
@@ -91,16 +91,16 @@ final class FrontendRenderer {
|
||||
}
|
||||
|
||||
private static function render_reference_widget(WidgetDefinition $definition, array $instance, SchemaWidget $widget, string $content): void {
|
||||
$classes = ['zib-widget-wrap', 'aksrt-' . str_replace('_', '-', $definition->slug()) . '-wrap'];
|
||||
$classes = ['zib-widget-wrap', 'jio-' . str_replace('_', '-', $definition->slug()) . '-wrap'];
|
||||
if (in_array($definition->slug(), ['user_card', 'author_card'], true)) {
|
||||
$classes[] = 'aksrt-user-widget-wrap';
|
||||
$classes[] = 'jio-user-widget-wrap';
|
||||
}
|
||||
$device_class = WidgetVisibility::device_class($instance);
|
||||
if ($device_class !== '') {
|
||||
$classes[] = $device_class;
|
||||
}
|
||||
if (!empty($instance['sidebar_affix'])) {
|
||||
$classes[] = 'aksrt-widget--affix';
|
||||
$classes[] = 'jio-widget--affix';
|
||||
}
|
||||
|
||||
$content_classes = ['widget-content'];
|
||||
@@ -113,7 +113,7 @@ final class FrontendRenderer {
|
||||
|
||||
$style = self::style($instance);
|
||||
$affix_attr = !empty($instance['sidebar_affix']) ? ' data-affix="true"' : '';
|
||||
echo '<div class="' . esc_attr(implode(' ', $classes)) . '" data-aksrt-widget="' . esc_attr($definition->slug()) . '" data-widget-id="' . esc_attr((string) $widget->id) . '"' . $affix_attr . ($style !== '' ? ' style="' . esc_attr($style) . '"' : '') . '>';
|
||||
echo '<div class="' . esc_attr(implode(' ', $classes)) . '" data-jio-widget="' . esc_attr($definition->slug()) . '" data-widget-id="' . esc_attr((string) $widget->id) . '"' . $affix_attr . ($style !== '' ? ' style="' . esc_attr($style) . '"' : '') . '>';
|
||||
echo '<div class="widget-container"><div>';
|
||||
echo self::reference_title($instance); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<div class="' . esc_attr(implode(' ', $content_classes)) . '">' . $content . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
@@ -131,11 +131,11 @@ final class FrontendRenderer {
|
||||
$safe_highlight = esc_html($highlight);
|
||||
$safe_title = str_replace($safe_highlight, '<mark class="' . esc_attr((string) ($instance['title_highlight_color'] ?? 'focus-color')) . '">' . $safe_highlight . '</mark>', $safe_title);
|
||||
}
|
||||
$html = '<header class="aksrt-widget__header' . (($instance['title_style'] ?? '') === 'big' ? ' aksrt-widget__header--big' : '') . '"><div><h2 class="aksrt-widget__title">' . nl2br($safe_title) . '</h2>';
|
||||
$html = '<header class="jio-widget__header' . (($instance['title_style'] ?? '') === 'big' ? ' jio-widget__header--big' : '') . '"><div><h2 class="jio-widget__title">' . nl2br($safe_title) . '</h2>';
|
||||
if (!empty($instance['subtitle'])) {
|
||||
$html .= '<p class="aksrt-widget__subtitle">' . nl2br(wp_kses_post((string) $instance['subtitle'])) . '</p>';
|
||||
$html .= '<p class="jio-widget__subtitle">' . nl2br(wp_kses_post((string) $instance['subtitle'])) . '</p>';
|
||||
}
|
||||
$html .= '</div><nav class="aksrt-widget__title-links" aria-label="' . esc_attr__('模块链接', 'aksrt') . '">';
|
||||
$html .= '</div><nav class="jio-widget__title-links" aria-label="' . esc_attr__('模块链接', 'jio') . '">';
|
||||
foreach (['title_link', 'title_link2', 'title_link3'] as $index => $key) {
|
||||
$link = RendererHelpers::link((array) ($instance[$key] ?? []));
|
||||
if ($link['url'] !== '' && $link['text'] !== '') {
|
||||
@@ -159,7 +159,7 @@ final class FrontendRenderer {
|
||||
return '<div class="big-title-wrap"><h2 class="big-title">' . $title . '</h2>' . ($subtitle ? '<p class="big-title-sub muted-2-color">' . $subtitle . '</p>' : '') . ($links ? '<div class="flex jc big-title-buts">' . $links . '</div>' : '') . '</div>';
|
||||
}
|
||||
$link = RendererHelpers::link((array) ($instance['title_link'] ?? []));
|
||||
$more = $link['url'] ? '<div class="pull-right em09 mt3"><a class="muted-2-color" href="' . $link['url'] . '"' . RendererHelpers::link_attrs($link) . '>' . esc_html($link['text'] ?: __('更多', 'aksrt')) . '</a></div>' : '';
|
||||
$more = $link['url'] ? '<div class="pull-right em09 mt3"><a class="muted-2-color" href="' . $link['url'] . '"' . RendererHelpers::link_attrs($link) . '>' . esc_html($link['text'] ?: __('更多', 'jio')) . '</a></div>' : '';
|
||||
return '<div class="box-body notop"><div class="title-theme">' . $title . ($subtitle ? '<small class="ml10">' . $subtitle . '</small>' : '') . $more . '</div></div>';
|
||||
}
|
||||
|
||||
@@ -169,17 +169,17 @@ final class FrontendRenderer {
|
||||
foreach (['top', 'right', 'bottom', 'left'] as $edge) {
|
||||
$value = $instance[$key][$edge] ?? '';
|
||||
if ($value !== '' && is_numeric($value)) {
|
||||
$properties[] = '--aksrt-widget-' . $prefix . '-' . $edge . ':' . (float) $value . 'px';
|
||||
$properties[] = '--jio-widget-' . $prefix . '-' . $edge . ':' . (float) $value . 'px';
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (['light', 'dark'] as $mode) {
|
||||
$background = (array) ($instance['layout_bg'][$mode] ?? []);
|
||||
if (!empty($background['color'])) {
|
||||
$properties[] = '--aksrt-widget-bg-' . $mode . ':' . (string) $background['color'];
|
||||
$properties[] = '--jio-widget-bg-' . $mode . ':' . (string) $background['color'];
|
||||
}
|
||||
if (!empty($background['image'])) {
|
||||
$properties[] = '--aksrt-widget-bg-image-' . $mode . ':url(' . esc_url_raw((string) $background['image']) . ')';
|
||||
$properties[] = '--jio-widget-bg-image-' . $mode . ':url(' . esc_url_raw((string) $background['image']) . ')';
|
||||
}
|
||||
}
|
||||
return implode(';', $properties);
|
||||
|
||||
Reference in new issue
Block a user