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
@@ -4,14 +4,14 @@
|
||||
*
|
||||
* Expects no output. Returns $ctx array.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$front = class_exists('\AKSRT\Core\FrontSubmit') ? \AKSRT\Core\FrontSubmit::get_instance() : null;
|
||||
$front = class_exists('\Jio\Core\FrontSubmit') ? \Jio\Core\FrontSubmit::get_instance() : null;
|
||||
$user_id = get_current_user_id();
|
||||
$settings = $front ? $front->settings() : (class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_submit_settings() : []);
|
||||
$settings = $front ? $front->settings() : (class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_submit_settings() : []);
|
||||
$enabled = !isset($settings['enabled']) || !empty($settings['enabled']);
|
||||
|
||||
$edit_id = isset($_GET['edit']) ? absint($_GET['edit']) : 0;
|
||||
@@ -38,17 +38,17 @@ $cap = static function (string $c) use ($front, $user_id, $edit_id): bool {
|
||||
if ($front) {
|
||||
return $front->user_can_cap($c, $user_id, $edit_id ?: null);
|
||||
}
|
||||
return function_exists('aksrt_user_can') ? aksrt_user_can($c, $user_id, $edit_id ?: null) : ($user_id > 0);
|
||||
return function_exists('jio_user_can') ? jio_user_can($c, $user_id, $edit_id ?: null) : ($user_id > 0);
|
||||
};
|
||||
|
||||
$post_meta = [];
|
||||
if ($edit_post) {
|
||||
$raw_meta = get_post_meta($edit_post->ID, \AKSRT\Core\DomainModel::POST_META_KEY, true);
|
||||
$raw_meta = get_post_meta($edit_post->ID, \Jio\Core\DomainModel::POST_META_KEY, true);
|
||||
$post_meta = is_array($raw_meta) ? $raw_meta : [];
|
||||
}
|
||||
$pay_meta = ($edit_post && function_exists('aksrt_get_pay_meta'))
|
||||
? aksrt_get_pay_meta($edit_post->ID)
|
||||
: (class_exists('\AKSRT\Core\DomainModel') ? \AKSRT\Core\DomainModel::default_pay_meta() : []);
|
||||
$pay_meta = ($edit_post && function_exists('jio_get_pay_meta'))
|
||||
? jio_get_pay_meta($edit_post->ID)
|
||||
: (class_exists('\Jio\Core\DomainModel') ? \Jio\Core\DomainModel::default_pay_meta() : []);
|
||||
|
||||
// Featured initial args for JS.
|
||||
$featured_args = ['type' => '', 'data' => new stdClass(), 'options' => [
|
||||
@@ -110,8 +110,8 @@ $current_cats = $edit_post ? wp_get_post_categories($edit_post->ID) : [];
|
||||
|
||||
$custom_dimensions = [];
|
||||
$current_cf = [];
|
||||
if (!empty($settings['custom_filter_s']) && class_exists('\AKSRT\Settings\Settings')) {
|
||||
$filter_all = \AKSRT\Settings\Settings::get_post_filter_settings();
|
||||
if (!empty($settings['custom_filter_s']) && class_exists('\Jio\Settings\Settings')) {
|
||||
$filter_all = \Jio\Settings\Settings::get_post_filter_settings();
|
||||
$custom_dimensions = $filter_all['custom_filter'] ?? [];
|
||||
if ($edit_post && !empty($custom_dimensions)) {
|
||||
foreach ($custom_dimensions as $dim) {
|
||||
@@ -119,7 +119,7 @@ if (!empty($settings['custom_filter_s']) && class_exists('\AKSRT\Settings\Settin
|
||||
if ($key === '') {
|
||||
continue;
|
||||
}
|
||||
$current_cf[$key] = get_post_meta($edit_post->ID, '_aksrt_cf_' . $key, true);
|
||||
$current_cf[$key] = get_post_meta($edit_post->ID, '_jio_cf_' . $key, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,12 +146,12 @@ if ($user_id > 0) {
|
||||
}
|
||||
|
||||
// VIP labels / points.
|
||||
$vip = class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'get_vip_settings')
|
||||
? \AKSRT\Settings\Settings::get_vip_settings()
|
||||
$vip = class_exists('\Jio\Settings\Settings') && method_exists('\Jio\Settings\Settings', 'get_vip_settings')
|
||||
? \Jio\Settings\Settings::get_vip_settings()
|
||||
: [];
|
||||
if (empty($vip) && class_exists('\AKSRT\Settings\PaymentRuntime')) {
|
||||
if (empty($vip) && class_exists('\Jio\Settings\PaymentRuntime')) {
|
||||
// Fallback: read common keys.
|
||||
$all = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
|
||||
$all = class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_all() : [];
|
||||
$vip = [
|
||||
'vip1_enabled' => !empty($all['pay_user_vip_1_s']),
|
||||
'vip2_enabled' => !empty($all['pay_user_vip_2_s']),
|
||||
@@ -166,15 +166,15 @@ $vip = [
|
||||
'vip1_name' => (string) ($vip['vip1_name'] ?? $vip_levels[1]['name'] ?? 'VIP1'),
|
||||
'vip2_name' => (string) ($vip['vip2_name'] ?? $vip_levels[2]['name'] ?? 'VIP2'),
|
||||
];
|
||||
$points_enabled = class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'credits_enabled')
|
||||
? \AKSRT\Settings\Settings::credits_enabled()
|
||||
$points_enabled = class_exists('\Jio\Settings\Settings') && method_exists('\Jio\Settings\Settings', 'credits_enabled')
|
||||
? \Jio\Settings\Settings::credits_enabled()
|
||||
: false;
|
||||
|
||||
$submit_label = __('发布', 'aksrt');
|
||||
$submit_label = __('发布', 'jio');
|
||||
if ($is_guest) {
|
||||
$submit_label = __('审核', 'aksrt');
|
||||
$submit_label = __('审核', 'jio');
|
||||
} elseif ($edit_post && in_array($post_status, ['publish', 'pending'], true)) {
|
||||
$submit_label = __('保存', 'aksrt');
|
||||
$submit_label = __('保存', 'jio');
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Reference in new issue
Block a user