refactor(assets): vendor 资产迁入标准目录并全仓去除 zibll 标识
- assets/vendor 全量迁移: fontawesome5→assets/fontawesome5, css→assets/css, js→assets/js/runtime(避开 14 个同名自有文件), img 合并去重→assets/img, fonts→assets/fonts; 删除 assets/vendor - libs 五个与 widgets/third-party 字节相同的库不重复入库, loader paths 改指向 - 运行时切换: _win.uri=assets 根, loader baseUrl=/js/runtime, enlighter 注入 路径同步; PHP 7 个引用文件切换并改名 $zibll_*→$runtime_* - 去品牌: Qinver 头注释/品牌 console.log/演示链接清除, 默认文案中性化 - 功能标识符改名: zib__→aksrt__, zib_ajax→aksrt_ajax, window.zib→ window.aksrtLegacy, zibllblock/*→aksrtblock/*, .zib-widget→.aksrt-panel, .zib-slider→.aksrt-slider, zib_menu_options meta 键等 - 自有 CSS 改名: legacy-utilities/compat-vars/footer shell - admin SPA 重建; 契约测试同步(路径/断言/文件更名) - 例外保留: tests/visual 对照环境与 fixtures 前缀(外部 Zibll 产品引用) 验证: php -l 133 个改动文件通过; runtime 86 个 JS node --check 通过; 契约测试 68/70(2 个失败经 stash 对照确认为存量问题)
This commit is contained in:
1 parent
4f2391fb64
commit
9375b1c30c
591 files changed
+1690
-11041
No files matched your search
@@ -57,7 +57,7 @@ trait AuthReader {
|
||||
return get_template_directory_uri() . '/assets/img/' . $filename;
|
||||
}
|
||||
|
||||
/** 获取Logo URL(留空时使用内置默认;zibll别名 logo_src 回退) */
|
||||
/** 获取Logo URL(留空时使用内置默认;legacy别名 logo_src 回退) */
|
||||
public static function logo_url(): string {
|
||||
$url = trim((string) self::get_value('site_logo', ''));
|
||||
if ($url === '') {
|
||||
@@ -66,7 +66,7 @@ trait AuthReader {
|
||||
return $url !== '' ? $url : self::default_asset_url('default-logo.svg');
|
||||
}
|
||||
|
||||
/** 获取暗色模式 Logo URL(留空时跟随浅色模式;zibll别名 logo_src_dark 回退) */
|
||||
/** 获取暗色模式 Logo URL(留空时跟随浅色模式;legacy别名 logo_src_dark 回退) */
|
||||
public static function logo_dark_url(): string {
|
||||
$url = trim((string) self::get_value('site_logo_dark', ''));
|
||||
if ($url === '') {
|
||||
|
||||
@@ -122,7 +122,7 @@ trait CreditsPaymentGroups {
|
||||
}
|
||||
|
||||
/**
|
||||
* Dual-level VIP settings (Zibll pay_user_vip_1 / pay_user_vip_2).
|
||||
* Dual-level VIP settings (legacy pay_user_vip_1 / pay_user_vip_2).
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
|
||||
@@ -93,12 +93,12 @@ trait DisplayPageGroups {
|
||||
|
||||
/** @return list<array<string,mixed>> */
|
||||
private static function header_slider_default_slides(): array {
|
||||
$base = defined('AKSRT_URI') ? trailingslashit(AKSRT_URI) . 'assets/vendor/zibll/img/' : '';
|
||||
$base = defined('AKSRT_URI') ? trailingslashit(AKSRT_URI) . 'assets/img/' : '';
|
||||
$slides = [];
|
||||
foreach (['slider-bg.jpg', 'user_t.jpg'] as $image) {
|
||||
$slides[] = [
|
||||
'background' => $base . $image,
|
||||
'link' => ['url' => 'https://www.zibll.com/', 'target' => '_blank'],
|
||||
'link' => ['url' => 'https://www.legacy.com/', 'target' => '_blank'],
|
||||
'text' => ['desc' => '', 'title' => ''],
|
||||
'text_align' => 'left-bottom',
|
||||
'text_parallax' => 30,
|
||||
|
||||
@@ -33,7 +33,7 @@ trait DomainGroups {
|
||||
public static function get_footer_layout_template(): string {
|
||||
$footer = self::get_footer_settings();
|
||||
$template = sanitize_key((string) ($footer['layout_template'] ?? 'template_1'));
|
||||
// Legacy aliases map onto Zibll template_1 shell.
|
||||
// Legacy aliases map onto legacy template_1 shell.
|
||||
if (in_array($template, ['default', 'compact', 'centered', 'template_1'], true)) {
|
||||
return 'template_1';
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class HomeCms {
|
||||
$s = Settings::read_domain('page_display', 'homepage');
|
||||
$allowed_sorts = self::homepage_allowed_sorts();
|
||||
|
||||
// Canonical Zibll-aligned primary list contract.
|
||||
// Canonical legacy-aligned primary list contract.
|
||||
$main_list_enabled = !array_key_exists('home_posts_list_s', $s) || !empty($s['home_posts_list_s']);
|
||||
$sort_bar_enabled = !array_key_exists('home_list1_orderby_s', $s) || !empty($s['home_list1_orderby_s']);
|
||||
|
||||
@@ -134,7 +134,7 @@ class HomeCms {
|
||||
$tabs_raw = isset($s['home_lists']) && is_array($s['home_lists']) ? $s['home_lists'] : [];
|
||||
|
||||
$settings = [
|
||||
// Canonical Zibll keys.
|
||||
// Canonical legacy keys.
|
||||
'home_posts_list_s' => $main_list_enabled,
|
||||
'home_list1_orderby_s' => $sort_bar_enabled,
|
||||
'home_list1_orderby_option' => ['lists' => $sort_options, 'dropdown' => !empty($orderby_option['dropdown'])],
|
||||
|
||||
@@ -18,7 +18,7 @@ class PaymentRuntime {
|
||||
$settings = Settings::get_all();
|
||||
|
||||
$box_position = sanitize_key((string) ($settings['pay_box_position'] ?? 'top'));
|
||||
// Zibll: box_top | top | bottom | box_bottom
|
||||
// legacy: box_top | top | bottom | box_bottom
|
||||
if (!in_array($box_position, ['box_top', 'top', 'bottom', 'box_bottom'], true)) {
|
||||
$box_position = 'top';
|
||||
}
|
||||
@@ -59,7 +59,7 @@ class PaymentRuntime {
|
||||
}
|
||||
|
||||
/**
|
||||
* Content coupon global switches (zibll coupon_post_s).
|
||||
* Content coupon global switches (legacy coupon_post_s).
|
||||
*
|
||||
* @return array{enabled:bool,desc:string}
|
||||
*/
|
||||
@@ -72,7 +72,7 @@ class PaymentRuntime {
|
||||
}
|
||||
|
||||
/**
|
||||
* Balance recharge settings (Zibll pay_balance_* contract).
|
||||
* Balance recharge settings (legacy pay_balance_* contract).
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
@@ -138,7 +138,7 @@ class PaymentRuntime {
|
||||
}
|
||||
|
||||
/**
|
||||
* Dual-level VIP settings (Zibll pay_user_vip_1 / pay_user_vip_2).
|
||||
* Dual-level VIP settings (legacy pay_user_vip_1 / pay_user_vip_2).
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
@@ -344,7 +344,7 @@ class PaymentRuntime {
|
||||
}
|
||||
|
||||
/**
|
||||
* Order display / checkout policy (Zibll pay_* + AKSRT order ops).
|
||||
* Order display / checkout policy (legacy pay_* + AKSRT order ops).
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
|
||||
@@ -141,7 +141,7 @@ class PostDisplay {
|
||||
// Canonical render keys (used by aksrt_single_*). Legacy *_s aliases kept for older callers.
|
||||
$breadcrumbs = !isset($settings['breadcrumbs_single_s']) || !empty($settings['breadcrumbs_single_s']);
|
||||
$breadcrumbs_home = sanitize_text_field((string) ($settings['breadcrumbs_home_text'] ?? '首页'));
|
||||
// Zibll breadcrumbs_single_text: true → last crumb is "正文"; false → full title.
|
||||
// legacy breadcrumbs_single_text: true → last crumb is "正文"; false → full title.
|
||||
$breadcrumbs_single_text = !isset($settings['breadcrumbs_single_text']) || !empty($settings['breadcrumbs_single_text']);
|
||||
$prevnext = !isset($settings['post_prevnext_s']) || !empty($settings['post_prevnext_s']);
|
||||
$authordesc = !isset($settings['post_authordesc_s']) || !empty($settings['post_authordesc_s']);
|
||||
@@ -227,7 +227,7 @@ class PostDisplay {
|
||||
// Canonical + legacy share.
|
||||
'share_enabled' => $share_enabled,
|
||||
'share_s' => $share_enabled,
|
||||
// Author card posts (Zibll user_card_box defaults).
|
||||
// Author card posts (legacy user_card_box defaults).
|
||||
'author_card_limit' => $author_card_limit,
|
||||
'author_card_orderby' => $author_card_orderby,
|
||||
'author_card_style' => $author_card_style,
|
||||
@@ -240,7 +240,7 @@ class PostDisplay {
|
||||
'rewards_custom' => !isset($settings['post_rewards_custom']) || !empty($settings['post_rewards_custom']),
|
||||
'rewards_min' => $rewards_min,
|
||||
'rewards_max' => $rewards_max,
|
||||
// Content max height (Zibll article_maxheight_kg / article_maxheight).
|
||||
// Content max height (legacy article_maxheight_kg / article_maxheight).
|
||||
'maxheight_enabled' => $maxheight_enabled,
|
||||
'maxheight' => $maxheight,
|
||||
'copyright_enabled' => !isset($settings['post_copyright_enabled']) || !empty($settings['post_copyright_enabled']),
|
||||
@@ -365,7 +365,7 @@ class PostDisplay {
|
||||
'submit_text' => $submit_text !== '' ? $submit_text : __('提交评论', 'aksrt'),
|
||||
'box_placeholder' => $box_placeholder !== '' ? $box_placeholder : __('说点什么吧...', 'aksrt'),
|
||||
'title' => $title !== '' ? $title : __('评论', 'aksrt'),
|
||||
// Extended zibll-parity settings.
|
||||
// Extended legacy-parity settings.
|
||||
'close_comments' => !empty($settings['comment_close_comments']),
|
||||
'hot_threshold' => max(1, min(999, (int) ($settings['comment_hot_threshold'] ?? 10))),
|
||||
'quick_s' => !isset($settings['comment_quick_s']) || !empty($settings['comment_quick_s']),
|
||||
@@ -395,7 +395,7 @@ class PostDisplay {
|
||||
|
||||
private static function normalize_comment_city_type(string $type): string {
|
||||
$type = sanitize_key($type);
|
||||
// Map legacy zibll pro/city labels.
|
||||
// Map legacy legacy pro/city labels.
|
||||
if ($type === 'pro') {
|
||||
return 'province';
|
||||
}
|
||||
@@ -448,7 +448,7 @@ class PostDisplay {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether list pagination uses AJAX append (Zibll paging_ajax_s).
|
||||
* Whether list pagination uses AJAX append (legacy paging_ajax_s).
|
||||
*
|
||||
* @param array<string,mixed>|null $settings
|
||||
*/
|
||||
@@ -462,7 +462,7 @@ class PostDisplay {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether AJAX list paging auto-loads on scroll (Zibll paging_ajax_ias_s).
|
||||
* Whether AJAX list paging auto-loads on scroll (legacy paging_ajax_ias_s).
|
||||
*
|
||||
* @param array<string,mixed>|null $settings
|
||||
*/
|
||||
|
||||
@@ -400,14 +400,14 @@ class Settings {
|
||||
|
||||
|
||||
|
||||
/** time-auto:对齐 zibll 早晚 8 点自动切换语义。 */
|
||||
/** time-auto:对齐 legacy 早晚 8 点自动切换语义。 */
|
||||
public static function time_auto_theme_mode(): string {
|
||||
return ThemeSearch::time_auto_theme_mode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 首屏主题模式:优先消费 zibll 兼容 cookie,回退后台默认值。 */
|
||||
/** 首屏主题模式:优先消费 legacy 兼容 cookie,回退后台默认值。 */
|
||||
public static function initial_theme_mode(): string {
|
||||
return ThemeSearch::initial_theme_mode();
|
||||
}
|
||||
@@ -633,7 +633,7 @@ class Settings {
|
||||
|
||||
|
||||
/**
|
||||
* Zibll 9.0 post-list display settings.
|
||||
* legacy 9.0 post-list display settings.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user