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

+79 -79
View File
@@ -1,12 +1,12 @@
/**
* AKSRT Gutenberg Blocks
* Jio Gutenberg Blocks
*
* Custom Gutenberg block extensions for the AKSRT theme.
* Custom Gutenberg block extensions for the Jio theme.
* Provides 9 generic content blocks adapted from legacy.
*
* Blocks: tabs, tab, enlighter, quote, alert, buttons, collapse, feature, iframe
*
* @package AKSRT
* @package Jio
*/
(function () {
@@ -54,20 +54,20 @@
);
}
var CATEGORY = 'aksrt-blocks';
var CATEGORY = 'jio-blocks';
var BLOCK_ICON = h('svg', { viewBox: '0 0 24 24', width: 20, height: 20 },
h('path', { d: 'M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5', fill: 'none', stroke: 'currentColor', strokeWidth: 2 })
);
// Register category BEFORE any registerBlockType (filter-after-register is too late).
if (window.wp.hooks && window.wp.hooks.addFilter) {
wp.hooks.addFilter('blocks.getBlockCategories', 'aksrt/block-categories', function (categories) {
wp.hooks.addFilter('blocks.getBlockCategories', 'jio/block-categories', function (categories) {
var list = Array.isArray(categories) ? categories.slice() : [];
var hasAksrt = list.some(function (c) { return c && c.slug === CATEGORY; });
if (hasAksrt) return list;
var hasJio = list.some(function (c) { return c && c.slug === CATEGORY; });
if (hasJio) return list;
list.push({
slug: CATEGORY,
title: 'AKSRT',
title: 'Jio',
icon: null,
});
return list;
@@ -90,7 +90,7 @@
// 1. Tabs Block
// ================================================================
registerBlockType('aksrt/tabs', {
registerBlockType('jio/tabs', {
title: '标签页',
icon: BLOCK_ICON,
category: CATEGORY,
@@ -112,26 +112,26 @@
onChange: function (v) { props.setAttributes({ style: v }); }
})
),
h('div', { className: 'aksrt-block-tabs aksrt-block-tabs--' + props.attributes.style },
h('div', { className: 'jio-block-tabs jio-block-tabs--' + props.attributes.style },
h(InnerBlocks, {
allowedBlocks: ['aksrt/tab'],
template: [['aksrt/tab', { title: '标签 1' }], ['aksrt/tab', { title: '标签 2' }]],
allowedBlocks: ['jio/tab'],
template: [['jio/tab', { title: '标签 1' }], ['jio/tab', { title: '标签 2' }]],
})
)
);
},
save: function (props) {
return h('div', { className: 'aksrt-block-tabs aksrt-block-tabs--' + props.attributes.style },
return h('div', { className: 'jio-block-tabs jio-block-tabs--' + props.attributes.style },
h(InnerBlocks.Content, null)
);
},
});
registerBlockType('aksrt/tab', {
registerBlockType('jio/tab', {
title: '标签页项',
icon: BLOCK_ICON,
category: CATEGORY,
parent: ['aksrt/tabs'],
parent: ['jio/tabs'],
attributes: {
title: { type: 'string', default: '标签' },
},
@@ -142,13 +142,13 @@
value: props.attributes.title,
onChange: function (v) { props.setAttributes({ title: v }); }
}),
h('div', { className: 'aksrt-block-tab__content' },
h('div', { className: 'jio-block-tab__content' },
h(InnerBlocks, null)
)
);
},
save: function (props) {
return h('div', { className: 'aksrt-block-tab', 'data-title': props.attributes.title },
return h('div', { className: 'jio-block-tab', 'data-title': props.attributes.title },
h(InnerBlocks.Content, null)
);
},
@@ -158,7 +158,7 @@
// 2. EnlighterJS Code Block
// ================================================================
registerBlockType('aksrt/enlighter', {
registerBlockType('jio/enlighter', {
title: '代码高亮',
icon: 'editor-code',
category: CATEGORY,
@@ -207,12 +207,12 @@
onChange: function (v) { props.setAttributes({ linenumbers: v }); }
})
),
h('div', { className: 'aksrt-block-enlighter' },
h('div', { className: 'aksrt-block-enlighter__header' },
h('span', { className: 'aksrt-block-enlighter__lang' }, props.attributes.language)
h('div', { className: 'jio-block-enlighter' },
h('div', { className: 'jio-block-enlighter__header' },
h('span', { className: 'jio-block-enlighter__lang' }, props.attributes.language)
),
h('textarea', {
className: 'aksrt-block-enlighter__code',
className: 'jio-block-enlighter__code',
value: props.attributes.code,
onChange: function (e) { props.setAttributes({ code: e.target.value }); },
placeholder: '在此输入代码...',
@@ -240,7 +240,7 @@
// 3. Quote Block
// ================================================================
registerBlockType('aksrt/quote-styled', {
registerBlockType('jio/quote-styled', {
title: '样式引用',
icon: 'editor-quote',
category: CATEGORY,
@@ -271,7 +271,7 @@
onChange: function (v) { props.setAttributes({ cite: v }); }
})
),
h('blockquote', { className: 'aksrt-block-quote aksrt-block-quote--' + props.attributes.style },
h('blockquote', { className: 'jio-block-quote jio-block-quote--' + props.attributes.style },
h(RichText, {
tagName: 'p',
value: props.attributes.content,
@@ -283,7 +283,7 @@
);
},
save: function (props) {
return h('blockquote', { className: 'aksrt-block-quote aksrt-block-quote--' + props.attributes.style },
return h('blockquote', { className: 'jio-block-quote jio-block-quote--' + props.attributes.style },
h(RichText.Content, { tagName: 'p', value: props.attributes.content }),
props.attributes.cite ? h('cite', null, props.attributes.cite) : null
);
@@ -294,7 +294,7 @@
// 4. Alert Block
// ================================================================
registerBlockType('aksrt/alert', {
registerBlockType('jio/alert', {
title: '提示框',
icon: 'warning',
category: CATEGORY,
@@ -325,8 +325,8 @@
})
),
h('div', {
className: 'aksrt-block-alert aksrt-block-alert--' + props.attributes.type +
(props.attributes.dismissible ? ' aksrt-block-alert--dismissible' : '')
className: 'jio-block-alert jio-block-alert--' + props.attributes.type +
(props.attributes.dismissible ? ' jio-block-alert--dismissible' : '')
},
h(RichText, {
tagName: 'p',
@@ -338,11 +338,11 @@
);
},
save: function (props) {
var cls = 'aksrt-block-alert aksrt-block-alert--' + props.attributes.type;
if (props.attributes.dismissible) cls += ' aksrt-block-alert--dismissible';
var cls = 'jio-block-alert jio-block-alert--' + props.attributes.type;
if (props.attributes.dismissible) cls += ' jio-block-alert--dismissible';
return h('div', { className: cls, role: 'alert' },
h(RichText.Content, { tagName: 'p', value: props.attributes.content }),
props.attributes.dismissible ? h('button', { type: 'button', className: 'aksrt-block-alert__close', 'aria-label': '关闭' }, '×') : null
props.attributes.dismissible ? h('button', { type: 'button', className: 'jio-block-alert__close', 'aria-label': '关闭' }, '×') : null
);
},
});
@@ -351,7 +351,7 @@
// 5. Buttons Block
// ================================================================
registerBlockType('aksrt/buttons', {
registerBlockType('jio/buttons', {
title: '按钮组',
icon: 'button',
category: CATEGORY,
@@ -373,26 +373,26 @@
onChange: function (v) { props.setAttributes({ align: v }); }
})
),
h('div', { className: 'aksrt-block-buttons aksrt-block-buttons--' + props.attributes.align },
h('div', { className: 'jio-block-buttons jio-block-buttons--' + props.attributes.align },
h(InnerBlocks, {
allowedBlocks: ['aksrt/button'],
template: [['aksrt/button', { text: '按钮', style: 'primary' }]],
allowedBlocks: ['jio/button'],
template: [['jio/button', { text: '按钮', style: 'primary' }]],
})
)
);
},
save: function (props) {
return h('div', { className: 'aksrt-block-buttons aksrt-block-buttons--' + props.attributes.align },
return h('div', { className: 'jio-block-buttons jio-block-buttons--' + props.attributes.align },
h(InnerBlocks.Content, null)
);
},
});
registerBlockType('aksrt/button', {
registerBlockType('jio/button', {
title: '按钮',
icon: 'button',
category: CATEGORY,
parent: ['aksrt/buttons'],
parent: ['jio/buttons'],
attributes: {
text: { type: 'string', default: '按钮' },
url: { type: 'string', default: '' },
@@ -437,7 +437,7 @@
),
h(RichText, {
tagName: 'span',
className: 'aksrt-block-btn aksrt-block-btn--' + props.attributes.style + ' aksrt-block-btn--' + props.attributes.size,
className: 'jio-block-btn jio-block-btn--' + props.attributes.style + ' jio-block-btn--' + props.attributes.size,
value: props.attributes.text,
onChange: function (v) { props.setAttributes({ text: v }); },
placeholder: '按钮文字...',
@@ -447,7 +447,7 @@
},
save: function (props) {
var linkProps = {
className: 'aksrt-block-btn aksrt-block-btn--' + props.attributes.style + ' aksrt-block-btn--' + props.attributes.size,
className: 'jio-block-btn jio-block-btn--' + props.attributes.style + ' jio-block-btn--' + props.attributes.size,
};
if (props.attributes.url) {
linkProps.href = props.attributes.url;
@@ -465,7 +465,7 @@
// 6. Collapse Block
// ================================================================
registerBlockType('aksrt/collapse', {
registerBlockType('jio/collapse', {
title: '折叠面板',
icon: 'arrow-down',
category: CATEGORY,
@@ -483,18 +483,18 @@
onChange: function (v) { props.setAttributes({ open: v }); }
})
),
h('div', { className: 'aksrt-block-collapse' },
h('div', { className: 'aksrt-block-collapse__header' },
h('div', { className: 'jio-block-collapse' },
h('div', { className: 'jio-block-collapse__header' },
h(RichText, {
tagName: 'span',
className: 'aksrt-block-collapse__title',
className: 'jio-block-collapse__title',
value: props.attributes.title,
onChange: function (v) { props.setAttributes({ title: v }); },
placeholder: '面板标题...',
}),
h('span', { className: 'aksrt-block-collapse__arrow' }, '▼')
h('span', { className: 'jio-block-collapse__arrow' }, '▼')
),
h('div', { className: 'aksrt-block-collapse__body' },
h('div', { className: 'jio-block-collapse__body' },
h(InnerBlocks, null)
)
)
@@ -502,13 +502,13 @@
},
save: function (props) {
return h('details', {
className: 'aksrt-block-collapse',
className: 'jio-block-collapse',
open: props.attributes.open ? true : undefined,
},
h('summary', { className: 'aksrt-block-collapse__header' },
h('span', { className: 'aksrt-block-collapse__title' }, props.attributes.title)
h('summary', { className: 'jio-block-collapse__header' },
h('span', { className: 'jio-block-collapse__title' }, props.attributes.title)
),
h('div', { className: 'aksrt-block-collapse__body' },
h('div', { className: 'jio-block-collapse__body' },
h(InnerBlocks.Content, null)
)
);
@@ -519,7 +519,7 @@
// 7. Feature Grid Block
// ================================================================
registerBlockType('aksrt/feature', {
registerBlockType('jio/feature', {
title: '特性网格',
icon: 'grid-view',
category: CATEGORY,
@@ -538,53 +538,53 @@
onChange: function (v) { props.setAttributes({ columns: v }); }
})
),
h('div', { className: 'aksrt-block-feature aksrt-block-feature--cols-' + props.attributes.columns },
h('div', { className: 'jio-block-feature jio-block-feature--cols-' + props.attributes.columns },
h(InnerBlocks, {
allowedBlocks: ['aksrt/feature-item'],
allowedBlocks: ['jio/feature-item'],
template: [
['aksrt/feature-item', { icon: 'fa fas fa-star', title: '特性一', desc: '特性描述' }],
['aksrt/feature-item', { icon: 'fa fas fa-heart', title: '特性二', desc: '特性描述' }],
['aksrt/feature-item', { icon: 'fa fas fa-bolt', title: '特性三', desc: '特性描述' }],
['jio/feature-item', { icon: 'fa fas fa-star', title: '特性一', desc: '特性描述' }],
['jio/feature-item', { icon: 'fa fas fa-heart', title: '特性二', desc: '特性描述' }],
['jio/feature-item', { icon: 'fa fas fa-bolt', title: '特性三', desc: '特性描述' }],
],
})
)
);
},
save: function (props) {
return h('div', { className: 'aksrt-block-feature aksrt-block-feature--cols-' + props.attributes.columns },
return h('div', { className: 'jio-block-feature jio-block-feature--cols-' + props.attributes.columns },
h(InnerBlocks.Content, null)
);
},
});
registerBlockType('aksrt/feature-item', {
registerBlockType('jio/feature-item', {
title: '特性项',
icon: 'star-filled',
category: CATEGORY,
parent: ['aksrt/feature'],
parent: ['jio/feature'],
attributes: {
icon: { type: 'string', default: 'fa fas fa-star' },
title: { type: 'string', default: '' },
desc: { type: 'string', default: '' },
},
edit: function (props) {
return h('div', { className: 'aksrt-block-feature__item' },
return h('div', { className: 'jio-block-feature__item' },
h(TextControl, {
label: '图标类名',
value: props.attributes.icon,
onChange: function (v) { props.setAttributes({ icon: v }); }
}),
h('i', { className: props.attributes.icon + ' aksrt-block-feature__icon' }),
h('i', { className: props.attributes.icon + ' jio-block-feature__icon' }),
h(RichText, {
tagName: 'h3',
className: 'aksrt-block-feature__title',
className: 'jio-block-feature__title',
value: props.attributes.title,
onChange: function (v) { props.setAttributes({ title: v }); },
placeholder: '标题...',
}),
h(RichText, {
tagName: 'p',
className: 'aksrt-block-feature__desc',
className: 'jio-block-feature__desc',
value: props.attributes.desc,
onChange: function (v) { props.setAttributes({ desc: v }); },
placeholder: '描述...',
@@ -592,10 +592,10 @@
);
},
save: function (props) {
return h('div', { className: 'aksrt-block-feature__item' },
h('i', { className: props.attributes.icon + ' aksrt-block-feature__icon' }),
h('h3', { className: 'aksrt-block-feature__title' }, props.attributes.title),
h('p', { className: 'aksrt-block-feature__desc' }, props.attributes.desc)
return h('div', { className: 'jio-block-feature__item' },
h('i', { className: props.attributes.icon + ' jio-block-feature__icon' }),
h('h3', { className: 'jio-block-feature__title' }, props.attributes.title),
h('p', { className: 'jio-block-feature__desc' }, props.attributes.desc)
);
},
});
@@ -604,7 +604,7 @@
// 8. Responsive Iframe Block
// ================================================================
registerBlockType('aksrt/iframe', {
registerBlockType('jio/iframe', {
title: '响应式嵌入',
icon: 'video-alt3',
category: CATEGORY,
@@ -639,15 +639,15 @@
onChange: function (v) { props.setAttributes({ title: v }); }
})
),
h('div', { className: 'aksrt-block-iframe aksrt-block-iframe--' + props.attributes.ratio.replace(':', '-') },
h('div', { className: 'jio-block-iframe jio-block-iframe--' + props.attributes.ratio.replace(':', '-') },
props.attributes.src
? h('iframe', { src: props.attributes.src, title: props.attributes.title || '嵌入内容', allowfullscreen: true })
: h('div', { className: 'aksrt-block-iframe__placeholder' }, '请输入嵌入 URL')
: h('div', { className: 'jio-block-iframe__placeholder' }, '请输入嵌入 URL')
)
);
},
save: function (props) {
return h('div', { className: 'aksrt-block-iframe aksrt-block-iframe--' + props.attributes.ratio.replace(':', '-') },
return h('div', { className: 'jio-block-iframe jio-block-iframe--' + props.attributes.ratio.replace(':', '-') },
h('iframe', {
src: props.attributes.src,
title: props.attributes.title || '嵌入内容',
@@ -661,7 +661,7 @@
// ── Carousel Block (Gallery → Swiper) ──
// MediaUpload lives on wp.blockEditor; skip registration if unavailable.
if (MediaUpload) {
registerBlockType('aksrt/carousel', {
registerBlockType('jio/carousel', {
title: '轮播图',
icon: 'images-alt2',
category: CATEGORY,
@@ -713,7 +713,7 @@
);
var preview = attrs.images.length > 0
? h('div', { className: 'aksrt-carousel-preview', style: { display: 'flex', gap: '8px', flexWrap: 'wrap' } },
? h('div', { className: 'jio-carousel-preview', style: { display: 'flex', gap: '8px', flexWrap: 'wrap' } },
attrs.images.map(function (img, i) {
return h('img', {
key: i,
@@ -727,7 +727,7 @@
return h(Fragment, null,
inspector,
h('div', { className: 'aksrt-carousel-block' },
h('div', { className: 'jio-carousel-block' },
preview,
h(MediaUpload, {
onSelect: onSelectImages,
@@ -763,7 +763,7 @@
if (!editor || !editor.getEditedPostAttribute) return true;
var meta = editor.getEditedPostAttribute('meta') || {};
var pay = meta._aksrt_pay || {};
var pay = meta._jio_pay || {};
if (pay.pay_type !== 'reading') return false;
return pay.pay_modo === 'points'
? Number(pay.points_price || 0) > 0
@@ -771,7 +771,7 @@
}, []);
}
registerBlockType('aksrt/paid-fragment', {
registerBlockType('jio/paid-fragment', {
title: '付费可见',
icon: 'lock',
category: CATEGORY,
@@ -781,17 +781,17 @@
},
edit: function (props) {
var configured = usePaidReadingConfigured();
return h('div', { className: 'aksrt-paid-fragment-block' },
return h('div', { className: 'jio-paid-fragment-block' },
!configured && Notice ? h(Notice, { status: 'warning', isDismissible: false },
'请在“付费内容设置”中选择“付费阅读”并设置有效价格;未配置时此片段会公开显示。'
) : null,
h('div', { className: 'aksrt-paid-fragment-block__label' },
h('div', { className: 'jio-paid-fragment-block__label' },
h('span', { className: 'dashicons dashicons-lock', 'aria-hidden': true }),
'付费可见片段'
),
h(RichText, {
tagName: 'div',
className: 'aksrt-paid-fragment-block__content',
className: 'jio-paid-fragment-block__content',
value: props.attributes.content,
onChange: function (value) { props.setAttributes({ content: value }); },
placeholder: '输入购买后可见的内容…',