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:
kate522 committed 2026-08-22 16:16:30 +08:00
1 parent 4f2391fb64
commit 9375b1c30c
591 files changed
+1690 -11041

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
<?php
defined('ABSPATH') || exit;
// window._win runtime bridge (zibll zib_win_var)
// window._win runtime bridge (legacy aksrt_win_var)
add_action('wp_head', static function () {
if (function_exists('aksrt_print_win_var')) {
aksrt_print_win_var();
+1 -1
View File
@@ -49,7 +49,7 @@ add_action('admin_enqueue_scripts', function ($hook) {
if ($hook !== 'edit.php') return;
wp_enqueue_style(
'aksrt-font-awesome',
get_template_directory_uri() . '/assets/vendor/fontawesome5/css/all.min.css',
get_template_directory_uri() . '/assets/fontawesome5/css/all.min.css',
[],
'5.15.4'
);
+2 -2
View File
@@ -25,7 +25,7 @@ if (!function_exists('aksrt_get_ajax_null')) {
if (!function_exists('aksrt_get_ajax_next_paginate')) {
/**
* Load-more style paginate block (zibll zib_get_ajax_next_paginate subset).
* Load-more style paginate block (legacy subset).
*
* @param int $count_all Total items.
* @param int $page Current page (1-based).
@@ -116,7 +116,7 @@ if (!function_exists('aksrt_get_modal_link')) {
if (!function_exists('aksrt_get_ajax_number_paginate')) {
/**
* Numbered AJAX pager (zibll zib_get_ajax_number_paginate subset).
* Numbered AJAX pager (legacy subset).
*
* Links use class next-page ajax-next + ajax-replace so ajax-list.js
* replaces .ajax-item rows inside the nearest .ajaxpager.
+4 -4
View File
@@ -24,7 +24,7 @@ endif;
if (!function_exists('aksrt_resolve_post_list_render_config')) :
/**
* Build the Zibll-shaped arguments used by every list surface.
* Build the legacy-shaped arguments used by every list surface.
*
* @param array<string,mixed> $args {
* @type string $context home|category|tag|author|search|archive
@@ -90,7 +90,7 @@ endif;
if (!function_exists('aksrt_archive_get_sort_state')) :
/**
* Build the canonical Zibll orderby state for term archives.
* Build the canonical legacy orderby state for term archives.
*
* @param array<string,mixed> $option Page-display orderby fieldset.
* @return array{current:string,links:array<string,string>}
@@ -131,7 +131,7 @@ if (!function_exists('aksrt_archive_has_sidebar')) :
* @param bool $enabled Page-level sidebar toggle.
*/
function aksrt_archive_has_sidebar(string $preferred = '', bool $enabled = true): bool {
// $preferred kept for call-site compat; visibility is settings/meta driven (zibll).
// $preferred kept for call-site compat; visibility is settings/meta driven (legacy).
unset($preferred);
if (!$enabled) {
return false;
@@ -284,7 +284,7 @@ endif;
if (!function_exists('aksrt_archive_close_shell')) :
/**
* Close a shared archive shell.
* Sidebar is a sibling of .content-wrap (Zibll float dual-column).
* Sidebar is a sibling of .content-wrap (legacy float dual-column).
*
* @param array<string,mixed> $args Shell args.
*/
+3 -3
View File
@@ -1,6 +1,6 @@
<?php
/**
* Unified comments composition (Zibll-style closed surface).
* Unified comments composition (legacy-style closed surface).
*
* comments.php stays a thin mount point. Policy + sections live here.
*
@@ -589,7 +589,7 @@ endif;
if (!function_exists('aksrt_get_comment_ajax_loader')) :
/**
* Hidden skeleton loader shown while AJAX pagination runs (zibll parity).
* Hidden skeleton loader shown while AJAX pagination runs (legacy parity).
*
* @return string
*/
@@ -601,7 +601,7 @@ endif;
if (!function_exists('aksrt_comments_render_empty')) :
/**
* Empty state (zibll: zib_get_null('暂无评论内容', 40, 'null.svg', 'comment comment-null')).
* Empty state (legacy: legacy('暂无评论内容', 40, 'null.svg', 'comment comment-null')).
*
* @param array<string,mixed> $ctx Comments context.
*/
+4 -4
View File
@@ -151,7 +151,7 @@ if (array_key_exists('show_toc', $meta) && $meta['show_toc'] !== '' && $meta['sh
if (!empty($meta['related_count'])) {
$settings['related_count'] = max(1, min(20, (int) $meta['related_count']));
}
// Per-post maxheight override (Zibll article_maxheight_xz). Global may already set maxheight_enabled.
// Per-post maxheight override (legacy article_maxheight_xz). Global may already set maxheight_enabled.
$meta_maxheight = (int) ($meta['maxheight'] ?? 0);
if ($meta_maxheight > 0) {
$settings['maxheight_enabled'] = true;
@@ -280,7 +280,7 @@ $settings['video_poster'] = (string) ($meta['cover_image'] ?? '');
endif;
if (!function_exists('aksrt_breadcrumbs')) :
/**
* 输出面包屑 HTML(single 对齐 Zibll `ul.breadcrumb`)。
* 输出面包屑 HTML(single 对齐 legacy `ul.breadcrumb`)。
*
* @param string $home_text Home label.
* @param array $args {
@@ -297,7 +297,7 @@ if (!function_exists('aksrt_breadcrumbs')) :
$single_text = array_key_exists('single_text', $args)
? !empty($args['single_text'])
: true;
// Zibll single breadcrumb: flat ul.breadcrumb without sep nodes.
// legacy single breadcrumb: flat ul.breadcrumb without sep nodes.
if (is_singular('post')) {
$cats = get_the_category();
if (empty($cats)) {
@@ -385,7 +385,7 @@ if (!function_exists('aksrt_render_mini_post_item')) :
/**
* Render a compact sidebar post item for homepage widgets.
*
* Render the dedicated Zibll mini-list item.
* Render the dedicated legacy mini-list item.
*
* @param int|WP_Post|null $post
* @param array<string, mixed> $args
+4 -4
View File
@@ -1,6 +1,6 @@
<?php
/**
* Shared graphic / cover card (zibll zib_graphic_card parity).
* Shared graphic / cover card (legacy parity).
*
* Used by term cards, cover cards, term aggregation thumbs, etc.
*
@@ -24,7 +24,7 @@ if (!function_exists('aksrt_graphic_card')) :
* @type string $text2 Secondary text.
* @type string $text3 Tertiary / badge text (HTML allowed for icon+count).
* @type string $more Extra absolute HTML (badge etc).
* @type bool $lazy Use the Zibll lazySizes contract.
* @type bool $lazy Use the legacy lazySizes contract.
* @type int|float $height_scale Padding-bottom % (0 = default CSS).
* @type int|float $mask_opacity 0–100 overlay opacity.
* @type string $hide pc|m|'' hide on device.
@@ -206,7 +206,7 @@ endif;
if (!function_exists('aksrt_author_minicard')) :
/**
* Author mini card for user lists (zibll zib_author_card).
* Author mini card for user lists (legacy).
*
* @param int $user_id
* @param string $class
@@ -241,7 +241,7 @@ if (!function_exists('aksrt_author_minicard')) :
])
: '<a href="' . esc_url($home) . '">' . esc_html($user->display_name) . '</a>';
// Follow control (separate from name, zibll places both in dt).
// Follow control (separate from name, legacy places both in dt).
$follow = '';
$current = get_current_user_id();
if ($current !== $user_id) {
+7 -7
View File
@@ -1,6 +1,6 @@
<?php
/**
* Header multi-function cluster (zibll zib_menu_button publish/VIP subset).
* Header multi-function cluster (legacy publish/VIP subset).
*
* @package AKSRT
*/
@@ -48,7 +48,7 @@ if (!function_exists('aksrt_normalize_header_cta_label')) :
}
if (stripos($label, '<i') === false) {
// No space between icon and label — spacing via CSS margin (zibll .but > .fa).
// No space between icon and label — spacing via CSS margin (legacy .but > .fa).
$label = '<i class="' . esc_attr($fallback_icon) . '" aria-hidden="true"></i><span class="navbar-cta-text">' . esc_html(wp_strip_all_tags($label)) . '</span>';
} else {
$label = preg_replace(
@@ -64,7 +64,7 @@ endif;
if (!function_exists('aksrt_render_new_add_btns')) :
/**
* Multi-type publish button (zibll newadd-btns).
* Multi-type publish button (legacy newadd-btns).
*
* @param string[] $types
*/
@@ -117,7 +117,7 @@ if (!function_exists('aksrt_render_new_add_btns')) :
. '</a>';
}
// zibll: span.newadd-btns.hover-show > toggle chip + .hover-show-con.drop-newadd
// legacy: span.newadd-btns.hover-show > toggle chip + .hover-show-con.drop-newadd
// Paint classes (jb-*, but, radius) MUST live on the toggle — wrapper is layout-only
// (background forced transparent). Bare navbar-but has no .navbar-but-cluster shell.
// data-aksrt-newadd: JS may portal menu to body so chip width cannot track menu.
@@ -150,7 +150,7 @@ if (!function_exists('aksrt_render_header_menu_buttons')) :
];
$html = '';
if (!empty($cfg['enabled'])) {
// zibll default: but nowave jb-blue (+ radius).
// legacy default: but nowave jb-blue (+ radius).
$class = 'but nowave navbar-newposts';
$skin = trim((string) ($cfg['class'] ?? ''));
if ($skin === '') {
@@ -168,7 +168,7 @@ if (!function_exists('aksrt_render_header_menu_buttons')) :
}
}
// VIP open CTA for guests / non-VIP (zibll: .pay-vip modal).
// VIP open CTA for guests / non-VIP (legacy: .pay-vip modal).
$user_id = get_current_user_id();
$show_vip = false;
if (class_exists('\AKSRT\Settings\Settings')) {
@@ -192,7 +192,7 @@ if (!function_exists('aksrt_render_header_menu_buttons')) :
}
}
}
// zibll: span.hover-show wraps button + .hover-show-con.sub-vip-card
// legacy: span.hover-show wraps button + .hover-show-con.sub-vip-card
$html .= '<span class="hover-show inline-block navbar-vip-hover">';
$html .= '<a class="but jb-red radius payvip-icon ml10 navbar-cta ' . esc_attr($cls) . '" href="javascript:;"'
. ($user_id > 0 ? ' vip-level="1"' : '') . '>';
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
/**
* Header user-box density helpers (zibll zib_header_user_box subset).
* Header user-box density helpers (legacy subset).
*
* @package AKSRT
*/
@@ -113,7 +113,7 @@ endif;
if (!function_exists('aksrt_header_payvip_bar')) :
/**
* VIP status / open CTA bar (zibll zib_get_header_payvip_icon parity).
* VIP status / open CTA bar (legacy parity).
*/
function aksrt_header_payvip_bar(int $user_id = 0): string {
$user_id = $user_id > 0 ? $user_id : get_current_user_id();
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* AKSRT Fixed Homepage Helpers
*
* Rebuilds the homepage around a fixed Zibll-like skeleton instead of the
* Rebuilds the homepage around a fixed legacy-like skeleton instead of the
* old freeform home modules canvas.
*
* @package AKSRT
+1 -1
View File
@@ -8,7 +8,7 @@
defined('ABSPATH') || exit;
/**
* Header language dropdown (zibll zib_get_translate_language_btn).
* Header language dropdown (legacy).
* Uses SPA i18n_available_langs when i18n enabled and position includes header.
*
* @param string $class Extra classes.
+10 -10
View File
@@ -1,6 +1,6 @@
<?php
/**
* Icon card helpers (zibll zib_icon_card / zib_icon_cover_card).
* Icon card helpers (legacy / legacy).
*
* @package AKSRT
*/
@@ -136,7 +136,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
*/
function aksrt_icon_cover_card(array $args = [], bool $echo = false): string {
$defaults = [
'class' => 'zib-widget',
'class' => 'aksrt-panel',
'icon' => '',
'icon_size' => 25,
'customize_icon' => '',
@@ -174,7 +174,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
}
$icon_fa = trim((string) $args['icon']);
// custom_icon (SPA) + customize_icon (zibll) + icon_image URL.
// custom_icon (SPA) + customize_icon (legacy) + icon_image URL.
$custom_src = (string) ($args['custom_icon'] !== '' ? $args['custom_icon'] : $args['customize_icon']);
$icon_img = esc_url_raw(trim((string) ($args['icon_image'] !== '' ? $args['icon_image'] : '')));
$custom_html = '';
@@ -196,10 +196,10 @@ if (!function_exists('aksrt_icon_cover_card')) :
$url = esc_url(trim((string) ($link['url'] ?? '')));
$target = sanitize_text_field((string) ($link['target'] ?? ''));
// zibll only adds target= when non-empty; keep same for 1:1.
// legacy only adds target= when non-empty; keep same for 1:1.
$tgt = ($target !== '' && $target !== '_self') ? ' target="' . esc_attr($target) . '"' : '';
// zibll: class = "icon-cover-icon badg cir" + optional icon_class (may include radius4 / c-* / jb-*).
// legacy: class = "icon-cover-icon badg cir" + optional icon_class (may include radius4 / c-* / jb-*).
// Do NOT sanitize_html_class on the whole string — it collapses multi-token classes.
$icon_class_extra = trim(preg_replace('/\s+/', ' ', (string) $args['icon_class']));
$icon_class = 'icon-cover-icon badg cir';
@@ -225,7 +225,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
}
$icon_size = max(14, min(64, (int) $args['icon_size']));
// zibll always sets font-size on the icon badge.
// legacy always sets font-size on the icon badge.
$style = 'font-size: ' . $icon_size . 'px;';
$custom_color = sanitize_hex_color((string) $args['icon_custom_color']);
if ($custom_color) {
@@ -237,8 +237,8 @@ if (!function_exists('aksrt_icon_cover_card')) :
} elseif ($icon_img !== '') {
$icon_inner = '<img' . aksrt_get_lazy_attr('lazy_other', $icon_img, 'img-icon') . ' alt="">';
} else {
// zibll: zib_get_cfs_icon($args['icon'], 'em09') — keep FA class + em09.
if ($icon_fa !== '' && !str_contains($icon_fa, 'fa-') && !str_contains($icon_fa, ' ') && !str_starts_with($icon_fa, 'zibsvg-')) {
// legacy: legacy($args['icon'], 'em09') — keep FA class + em09.
if ($icon_fa !== '' && !str_contains($icon_fa, 'fa-') && !str_contains($icon_fa, ' ') && !str_starts_with($icon_fa, 'aksrtsvg-')) {
$icon_fa = 'fa fas fa-' . $icon_fa;
}
if (str_contains($icon_fa, '<')) {
@@ -254,7 +254,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
}
$icon = '<div class="' . esc_attr(trim($icon_class)) . '" style="' . esc_attr($style) . '">' . $icon_inner . '</div>';
// zibll allows HTML in title/desc (admin stores badges etc.).
// legacy allows HTML in title/desc (admin stores badges etc.).
$title = (string) $args['title'];
$desc = (string) $args['desc'];
$allow = [
@@ -277,7 +277,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
$html = '';
if ($url !== '') {
// zibll: <a class="main-color" [target] href="...">
// legacy: <a class="main-color" [target] href="...">
$html .= '<a class="main-color" ' . ($tgt !== '' ? ltrim($tgt) . ' ' : '') . 'href="' . esc_url($url) . '">';
}
// Keep every horizontal icon card on the same compact visual contract,
+6 -6
View File
@@ -27,7 +27,7 @@ if (!function_exists('aksrt_render_user_identity_chips')) {
/**
* Render compact identity chips (verify / level / badges).
*
* Badge signals with icon_url render as Zibll-like medal images.
* Badge signals with icon_url render as legacy-like medal images.
*
* @param int $user_id
* @param string $context author|comment|card
@@ -121,7 +121,7 @@ if (!function_exists('aksrt_render_user_identity_chips')) {
if (!function_exists('aksrt_get_user_name')) {
/**
* Zibll zib_get_user_name parity: name link + auth + wear medal + level + optional follow.
* legacy parity: name link + auth + wear medal + level + optional follow.
*
* @param array|int $args User id or args array.
*/
@@ -188,7 +188,7 @@ if (!function_exists('aksrt_get_user_name')) {
if ($icon_url !== '') {
$level_html = '<img' . aksrt_get_lazy_attr('lazy_other', $icon_url, 'aksrt-user-level-icon img-icon ml3') . ' alt="' . esc_attr($label) . '" title="' . esc_attr($title) . '" decoding="async">';
} else {
// Text fallback mirrors zibll LV badge: small pill, never oversized.
// Text fallback mirrors legacy LV badge: small pill, never oversized.
$level_html = '<span class="badg badg-sm ml3 aksrt-user-level-badge" title="' . esc_attr($title) . '">' . esc_html($label) . '</span>';
}
} elseif ($type === 'badge' && !empty($args['medal']) && $medal_html === '' && !empty($signal['wear'])) {
@@ -230,7 +230,7 @@ if (!function_exists('aksrt_get_user_name')) {
}
}
// Order: name → auth → wear medal → level → follow (Zibll).
// Order: name → auth → wear medal → level → follow (legacy).
$html = '<name class="' . esc_attr((string) $args['class']) . '">' . $name_link . $vip_html . $auth_html . $medal_html . $level_html . $follow_html . '</name>';
/**
* Filter rendered user name chrome.
@@ -245,7 +245,7 @@ if (!function_exists('aksrt_get_user_name')) {
if (!function_exists('aksrt_render_user_medal_entry')) {
/**
* Render the compact Zibll-style badge overview entry.
* Render the compact legacy-style badge overview entry.
*
* The configured limit controls preview icons only; the count remains
* the complete owned badge count returned by the privacy-aware DTO.
@@ -344,7 +344,7 @@ if (!function_exists('aksrt_user_has_visible_badges')) {
if (!function_exists('aksrt_get_worn_medal_icon')) {
/**
* Render the worn medal icon HTML for a user (standalone, zibll parity).
* Render the worn medal icon HTML for a user (standalone, legacy parity).
*
* Returns an <img> tag when a badge is worn and has an icon_url in the
* dictionary. Handles the edge case where the worn slug lives in user meta
+1 -1
View File
@@ -93,7 +93,7 @@ endif;
if (!function_exists('aksrt_user_city_enabled')) :
/**
* Users feature: show city on user home / user center.
* Default true when key absent (zibll parity for new installs).
* Default true when key absent (legacy parity for new installs).
*/
function aksrt_user_city_enabled(): bool {
if (!class_exists('\AKSRT\Settings\Settings')) {
+6 -6
View File
@@ -1,6 +1,6 @@
<?php
/**
* 网址导航 / 书签链接渲染(zibll pages/links.php + zib_links_box parity).
* 网址导航 / 书签链接渲染(legacy pages/links.php + legacy parity).
*
* @package AKSRT
*/
@@ -84,7 +84,7 @@ if (!function_exists('aksrt_get_page_links_settings')) :
'order' => $order,
'go_s' => (bool) get_post_meta($post_id, 'page_links_go_s', true),
'blank_s' => (bool) get_post_meta($post_id, 'page_links_blank_s', true),
// Default nofollow ON (zibll default true).
// Default nofollow ON (legacy default true).
'nofollow_s' => get_post_meta($post_id, 'page_links_nofollow_s', true) === ''
? true
: (bool) get_post_meta($post_id, 'page_links_nofollow_s', true),
@@ -101,7 +101,7 @@ endif;
if (!function_exists('aksrt_links_box')) :
/**
* Render bookmark cards (zibll zib_links_box).
* Render bookmark cards (legacy).
*
* @param array<int,object|array> $links Bookmark rows from get_bookmarks().
*/
@@ -257,7 +257,7 @@ if (!function_exists('aksrt_page_links_html')) :
$offset_bottom = $is_mobile ? '20' : '-30';
$links_con = '<div class="fixed-wrap">'
. '<div class="fixed-wrap-nav affix-header-sm affix link-nav-box tab-auto-center-sm" data-offset-top="' . esc_attr((string) $offset_top) . '" data-offset-bottom="' . esc_attr((string) $offset_bottom) . '">'
. '<div class="zib-widget"><ul class="nav list-inline scroll-x mini-scrollbar tab-nav-theme">' . $link_cat_nav . '</ul></div>'
. '<div class="aksrt-panel"><ul class="nav list-inline scroll-x mini-scrollbar tab-nav-theme">' . $link_cat_nav . '</ul></div>'
. $submit_nav
. '</div><div class="fixed-wrap-content">' . $link_cat_con . $submit_con . '</div></div>';
}
@@ -292,7 +292,7 @@ endif;
if (!function_exists('aksrt_link_get_search_cover')) :
/**
* Search cover with multi-engine tabs (zibll zib_link_get_search_cover).
* Search cover with multi-engine tabs (legacy).
*/
function aksrt_link_get_search_cover(int $post_id = 0): string {
$post_id = $post_id > 0 ? $post_id : (int) get_queried_object_id();
@@ -393,7 +393,7 @@ endif;
if (!function_exists('aksrt_submit_links_modal')) :
/**
* Frontend submit modal markup (zibll zib_submit_links_modal).
* Frontend submit modal markup (legacy).
*
* @param array{title?:string,dec?:string,sign?:bool,cats?:int[]} $args
*/
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
/**
* Illustrated empty / null state helpers (Zibll zib_get_null parity).
* Illustrated empty / null state helpers (legacy parity).
*
* @package AKSRT
*/
@@ -33,7 +33,7 @@ if (!function_exists('aksrt_null_image_url')) {
if (!function_exists('aksrt_get_null')) {
/**
* Zibll-like empty illustration block.
* legacy-like empty illustration block.
*
* @param string|null $text Caption (null → 暂无内容).
* @param int|string $margin Vertical padding / top margin.
+19 -19
View File
@@ -1,6 +1,6 @@
<?php
/**
* AKSRT Pay System — 统一付费内容系统(1:1 对齐 zibll)
* AKSRT Pay System — 统一付费内容系统(1:1 对齐 legacy)
*
* 核心机制:
* - 任何 post 通过 _aksrt_pay meta 成为付费文章
@@ -218,7 +218,7 @@ if (!function_exists('aksrt_get_download_box_meta')) {
'view_count' => max(0, $view_count),
'virtual_sales' => $virtual_sales,
'sales_volume' => max(0, $sales_volume),
// Zibll: virtual (pay_cuont) + real sales_volume; fall back to downloads when no sales yet.
// legacy: virtual (pay_cuont) + real sales_volume; fall back to downloads when no sales yet.
'sales_count' => $show_sales ? ($virtual_sales + max(0, $sales_volume, $download_count)) : 0,
'show_sales' => $show_sales,
'download_limit_over_price' => $over_price,
@@ -276,7 +276,7 @@ if (!function_exists('aksrt_bump_content_sales_volume')) {
}
/**
* Whether guest cash purchase is allowed (Zibll pay_no_logged_in + pay_limit=0).
* Whether guest cash purchase is allowed (legacy pay_no_logged_in + pay_limit=0).
*/
if (!function_exists('aksrt_allow_guest_content_pay')) {
function aksrt_allow_guest_content_pay($post = null): bool {
@@ -307,7 +307,7 @@ if (!function_exists('aksrt_allow_guest_content_pay')) {
}
/**
* Cookie lifetime days for guest paid content (Zibll pay_cookie_day).
* Cookie lifetime days for guest paid content (legacy pay_cookie_day).
*/
if (!function_exists('aksrt_guest_pay_cookie_days')) {
function aksrt_guest_pay_cookie_days(int $post_id = 0): int {
@@ -337,7 +337,7 @@ if (!function_exists('aksrt_pay_client_ip')) {
}
/**
* Build token material for guest order cookie (zibll-style).
* Build token material for guest order cookie (legacy-style).
*
* @param array<string,mixed> $order
*/
@@ -385,7 +385,7 @@ if (!function_exists('aksrt_set_guest_pay_cookies')) {
}
/**
* Set guest paid cookies after content order paid (Zibll zibpay_posts_order_created_set_cookie).
* Set guest paid cookies after content order paid (legacy aksrtpay_posts_order_created_set_cookie).
*
* @param array<string,mixed> $order
*/
@@ -477,7 +477,7 @@ if (!function_exists('aksrt_guest_has_paid_access')) {
}
/**
* Resolve the amount a given user should pay for a post (Zibll VIP tier min).
* Resolve the amount a given user should pay for a post (legacy VIP tier min).
*
* VIP tier prices only apply when configured as a positive discount (< base).
* Full free for VIP uses vip_free_download / exempt roles (handled separately).
@@ -560,7 +560,7 @@ if (!function_exists('aksrt_get_user_pay_price')) {
}
/**
* Whether content cashier may accept coupons for this post (zibll coupon_post_s || coupon_s).
* Whether content cashier may accept coupons for this post (legacy coupon_post_s || coupon_s).
*/
if (!function_exists('aksrt_is_content_coupon_allowed')) {
function aksrt_is_content_coupon_allowed($post = null): bool {
@@ -582,7 +582,7 @@ if (!function_exists('aksrt_is_content_coupon_allowed')) {
/**
* Buyer-facing 推广折扣 amount for a post (0 if no eligible referrer).
* Cash only; mirrors zibpay_get_post_rebate_discount.
* Cash only; mirrors aksrtpay_get_post_rebate_discount.
*/
if (!function_exists('aksrt_get_post_rebate_discount')) {
function aksrt_get_post_rebate_discount($post = null, int $user_id = 0): float {
@@ -615,18 +615,18 @@ if (!function_exists('aksrt_get_post_rebate_discount')) {
}
/**
* Whether cash checkout may use points deduction (zibll points_deduction).
* Whether cash checkout may use points deduction (legacy points_deduction).
*
* zibll: zibpay_is_allow_points_deduction() always returns false ("暂未启用").
* legacy: aksrtpay_is_allow_points_deduction() always returns false ("暂未启用").
* Keep the same contract: schema/UI may exist, runtime is hard-off unless filter overrides.
*/
if (!function_exists('aksrt_is_allow_points_deduction')) {
function aksrt_is_allow_points_deduction(string $context = 'content'): bool {
// Mirror zibll hard-off first.
// Mirror legacy hard-off first.
$allowed = false;
if (class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'get_all')) {
$all = \AKSRT\Settings\Settings::get_all();
// Even if switch on, default remains false like zibll until product enables it.
// Even if switch on, default remains false like legacy until product enables it.
if (!empty($all['points_deduction_s']) && class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'credits_enabled') && \AKSRT\Settings\Settings::credits_enabled()) {
$allowed = false; // still disabled at runtime
}
@@ -637,7 +637,7 @@ if (!function_exists('aksrt_is_allow_points_deduction')) {
/**
* Content cashier does not accept card_pass payment_method.
* Card-pass for balance/VIP/points is user-center redeem (zibll order types 4/8/9),
* Card-pass for balance/VIP/points is user-center redeem (legacy order types 4/8/9),
* not content pay types (reading/download/gallery/video).
*/
if (!function_exists('aksrt_is_content_card_pass_pay_allowed')) {
@@ -848,7 +848,7 @@ if (!function_exists('aksrt_get_download_cost')) {
}
/**
* URL of the Zibll-style single-post download page (page template + ?post=ID).
* URL of the legacy-style single-post download page (page template + ?post=ID).
*/
if (!function_exists('aksrt_get_single_download_page_url')) {
function aksrt_get_single_download_page_url($post = null): string {
@@ -874,7 +874,7 @@ if (!function_exists('aksrt_get_single_download_page_url')) {
}
/**
* Whether independent download page mode is enabled (Zibll down_alone_page).
* Whether independent download page mode is enabled (legacy down_alone_page).
*/
if (!function_exists('aksrt_is_download_alone_page_enabled')) {
function aksrt_is_download_alone_page_enabled(): bool {
@@ -993,7 +993,7 @@ if (!function_exists('aksrt_get_pay_type_badge')) {
}
/**
* Zibll zibpay_get_service() — service bullets under pay/download box.
* legacy aksrtpay_get_service() — service bullets under pay/download box.
*
* @return string HTML list of service items.
*/
@@ -1045,7 +1045,7 @@ if (!function_exists('aksrt_get_pay_service_html')) {
}
/**
* Demo link button (Zibll zibpay_get_demo_link).
* Demo link button (legacy aksrtpay_get_demo_link).
*/
if (!function_exists('aksrt_get_demo_link_html')) {
function aksrt_get_demo_link_html($post = null, string $class = 'resource-download-box__btn btn-outline resource-download-box__btn--demo'): string {
@@ -1072,7 +1072,7 @@ if (!function_exists('aksrt_get_demo_link_html')) {
}
/**
* Product attributes row (Zibll zibpay_get_product_attributes).
* Product attributes row (legacy aksrtpay_get_product_attributes).
*/
if (!function_exists('aksrt_get_pay_attributes_html')) {
function aksrt_get_pay_attributes_html($post = null, string $class = 'resource-download-box__attrs'): string {
+2 -2
View File
@@ -164,7 +164,7 @@ if (!function_exists('aksrt_resource_price_amount')) {
if (!function_exists('aksrt_resource_card_badge_text')) {
/**
* List-card pay badge (Zibll zib_get_posts_list_pay_tags equivalent).
* List-card pay badge (legacy equivalent).
*
* Renders for any paid post type, not only download resources.
* Returns plain text; card template wraps with link + class.
@@ -193,7 +193,7 @@ if (!function_exists('aksrt_resource_card_badge_text')) {
$type_labels = function_exists('aksrt_get_pay_types') ? aksrt_get_pay_types() : [];
$type_name = $type_labels[$pay_type] ?? __('付费内容', 'aksrt');
// VIP-only / purchase limit (Zibll pay_limit).
// VIP-only / purchase limit (legacy pay_limit).
if ($pay_type === 'vip' || $pay_limit > 0) {
return __('会员专属', 'aksrt');
}
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
/**
* Float button commerce types + runtime window._win bridge (zibll parity).
* Float button commerce types + runtime window._win bridge (legacy parity).
*
* @package AKSRT
*/
@@ -79,7 +79,7 @@ endif;
if (!function_exists('aksrt_get_win_runtime_config')) :
/**
* Build window._win payload (zibll zib_win_var subset).
* Build window._win payload (legacy aksrt_win_var subset).
*
* @return array<string,mixed>
*/
+2 -2
View File
@@ -20,7 +20,7 @@ if (!function_exists('aksrt_single_render_overview_widget')) :
$modified = get_the_modified_date('', $post_id);
$overview_items = is_array($ctx['meta_items_secondary'] ?? null) ? $ctx['meta_items_secondary'] : [];
?>
<section class="zib-widget single-overview-widget" aria-labelledby="single-overview-title">
<section class="aksrt-panel single-overview-widget" aria-labelledby="single-overview-title">
<h3 id="single-overview-title" class="single-overview-widget__title">
<i class="fa fas fa-file-alt" aria-hidden="true"></i>
<?php esc_html_e('文章概览', 'aksrt'); ?>
@@ -76,7 +76,7 @@ if (!function_exists('aksrt_single_render_aside')) :
<?php endif; ?>
<?php if (!empty($ctx['show_toc'])) : ?>
<div class="zib-widget toc-widget posts-nav-box" data-title="<?php echo esc_attr((string) ($ctx['toc_title'] ?? __('文章目录', 'aksrt'))); ?>">
<div class="aksrt-panel toc-widget posts-nav-box" data-title="<?php echo esc_attr((string) ($ctx['toc_title'] ?? __('文章目录', 'aksrt'))); ?>">
<h3><?php echo esc_html((string) ($ctx['toc_title'] ?? __('文章目录', 'aksrt'))); ?></h3>
<ol class="toc-list"></ol>
</div>
+9 -9
View File
@@ -1,6 +1,6 @@
<?php
/**
* Single-post component helpers (Zibll parity).
* Single-post component helpers (legacy parity).
*
* Meta box, subtitle, status badge, allow-view gate, colored tags, related cards.
*
@@ -11,7 +11,7 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_get_the_subtitle')) :
/**
* Post subtitle (meta `_subtitle`), Zibll get_the_subtitle style.
* Post subtitle (meta `_subtitle`), legacy get_the_subtitle style.
*
* @param bool $span Wrap in focus-color span.
* @param string $class Extra class on the span.
@@ -53,7 +53,7 @@ endif;
if (!function_exists('aksrt_get_posts_meta_items_html')) :
/**
* Zibll-like post meta pills: comment + views + likes.
* legacy-like post meta pills: comment + views + likes.
*
* @param int|null $post_id Post ID.
*/
@@ -97,7 +97,7 @@ endif;
if (!function_exists('aksrt_get_single_meta_box')) :
/**
* Zibll zib_get_single_meta_box equivalent.
* legacy equivalent.
*
* @param string $class Extra class on wrapper.
* @param string $direction Unused (kept for API parity).
@@ -150,7 +150,7 @@ endif;
if (!function_exists('aksrt_get_post_status_badge')) :
/**
* Non-publish status badge (text badge, Zibll-compatible classes).
* Non-publish status badge (text badge, legacy-compatible classes).
*/
function aksrt_get_post_status_badge($post = null): string {
$post = get_post($post);
@@ -221,7 +221,7 @@ if (!function_exists('aksrt_get_single_article_tags_html')) :
$tags_html = '';
$tags = get_the_tags($post_id) ?: [];
if (!empty($tags) && is_array($tags)) {
// Sort by count desc like Zibll.
// Sort by count desc like legacy.
usort($tags, static function ($a, $b) {
return (int) $b->count <=> (int) $a->count;
});
@@ -243,7 +243,7 @@ endif;
if (!function_exists('aksrt_get_post_allow_view_data')) :
/**
* Category/post reading permission gate (Zibll zib_get_post_allow_view_data subset).
* Category/post reading permission gate (legacy subset).
*
* Supported term meta keys (first match wins, walks parents):
* - term meta `post_cat_config` array with `allow_view` = signin|login|roles
@@ -448,7 +448,7 @@ endif;
if (!function_exists('aksrt_get_allow_view_deny_shell')) :
function aksrt_get_allow_view_deny_shell(string $title, string $body_html): string {
return '<div class="zib-widget text-center allow-view-deny">'
return '<div class="aksrt-panel text-center allow-view-deny">'
. '<div class="box-body">'
. '<p class="em12 muted-2-color mb10"><i class="fa fas fa-lock fa-2x" aria-hidden="true"></i></p>'
. '<h3 class="em12">' . esc_html($title) . '</h3>'
@@ -478,7 +478,7 @@ add_filter('the_content', 'aksrt_single_content_allow_view', 8);
if (!function_exists('aksrt_render_related_graphic_card')) :
/**
* Minimal Zibll style-3 related thumb card.
* Minimal legacy style-3 related thumb card.
*/
function aksrt_render_related_graphic_card(WP_Post $post): string {
$subtitle = class_exists('\AKSRT\Core\PostMetaBox')
+13 -13
View File
@@ -1,6 +1,6 @@
<?php
/**
* Single post render helpers (Zibll-style composition pieces).
* Single post render helpers (legacy-style composition pieces).
*
* @package AKSRT
*/
@@ -9,7 +9,7 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_single_render_cover')) :
/**
* Cover / slide / video header (Zibll single-head-cover).
* Cover / slide / video header (legacy single-head-cover).
*
* @param array<string,mixed> $ctx Single context.
*/
@@ -167,7 +167,7 @@ if (!function_exists('aksrt_single_render_box_header')) :
<?php endif; ?>
<?php
// Author bar always shows in header (Zibll zib_single_box_header).
// Author bar always shows in header (legacy).
// `authordesc` only controls the after-box author card.
aksrt_single_render_author_bar([
'show_actions' => true,
@@ -405,7 +405,7 @@ if (!function_exists('aksrt_single_render_author_card')) :
|| !empty($aksrt_post_settings['post_rewards_enabled'])
|| !empty($aksrt_post_settings['post_rewards_s']);
?>
<div class="user-card author zib-widget">
<div class="user-card author aksrt-panel">
<div class="card-content mt10 relative">
<div class="user-content">
<div class="user-avatar"><?php echo $avatar; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
@@ -507,7 +507,7 @@ endif;
if (!function_exists('aksrt_single_render_prevnext')) :
/**
* Previous / next navigation (Zibll .article-nav).
* Previous / next navigation (legacy .article-nav).
*
* @param array<string,mixed> $ctx Single context.
*/
@@ -520,7 +520,7 @@ if (!function_exists('aksrt_single_render_prevnext')) :
return;
}
// Zibll: constrain to current category when available.
// legacy: constrain to current category when available.
$in_same_term = !empty(get_the_category());
$prev = get_previous_post($in_same_term, '', 'category');
$next = get_next_post($in_same_term, '', 'category');
@@ -560,7 +560,7 @@ endif;
if (!function_exists('aksrt_single_related_query_args')) :
/**
* Build related-posts WP_Query args (Zibll-like multi-tax OR + orderby).
* Build related-posts WP_Query args (legacy-like multi-tax OR + orderby).
*
* @param int $post_id Post ID.
* @param array<string,mixed> $settings Single display settings.
@@ -652,7 +652,7 @@ endif;
if (!function_exists('aksrt_single_render_related')) :
/**
* Related posts — Zibll-like list + optional shared mini renderer.
* Related posts — legacy-like list + optional shared mini renderer.
*
* @param array<string,mixed> $ctx Single context.
*/
@@ -718,7 +718,7 @@ if (!function_exists('aksrt_single_render_related')) :
<div class="box-body notop">
<div class="title-theme"><?php echo esc_html($title); ?></div>
</div>
<div class="zib-widget">
<div class="aksrt-panel">
<?php if ($style === 'img') : ?>
<div class="swiper-container swiper-scroll">
<div class="swiper-wrapper"><?php echo $posts_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
@@ -737,7 +737,7 @@ endif;
if (!function_exists('aksrt_single_render_pay_box')) :
/**
* Unified single pay module (Zibll zibpay_posts_pay_content equivalent).
* Unified single pay module (legacy aksrtpay_posts_pay_content equivalent).
*
* @param array<string,mixed> $ctx Single context.
*/
@@ -761,7 +761,7 @@ if (!function_exists('aksrt_single_render_pay_box')) :
$pay_type = (string) ($ctx['pay_type'] ?? 'no');
if (!empty($ctx['has_download']) || $pay_type === 'download') {
echo '<div class="zib-widget pay-box pay-type-download" id="posts-pay">';
echo '<div class="aksrt-panel pay-box pay-type-download" id="posts-pay">';
get_template_part('templates/parts/resource-download-box');
echo '</div>';
return;
@@ -773,7 +773,7 @@ if (!function_exists('aksrt_single_render_pay_box')) :
$has_access = function_exists('aksrt_has_paid_access') ? aksrt_has_paid_access($post) : false;
$paid_class = $has_access ? 'paid-box' : 'pay-box';
echo '<div class="zib-widget ' . esc_attr($paid_class) . ' pay-type-' . esc_attr($pay_type) . '" id="posts-pay">';
echo '<div class="aksrt-panel ' . esc_attr($paid_class) . ' pay-type-' . esc_attr($pay_type) . '" id="posts-pay">';
if ($has_access) {
if ($pay_type === 'gallery' && function_exists('aksrt_render_paid_gallery')) {
echo aksrt_render_paid_gallery($post); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -807,7 +807,7 @@ endif;
if (!function_exists('aksrt_single_render_article')) :
/**
* Main article box (Zibll zib_single_content order).
* Main article box (legacy order).
*
* @param array<string,mixed> $ctx Single context.
*/
+5 -5
View File
@@ -1,6 +1,6 @@
<?php
/**
* Unified single post composition (Zibll-style closed surface).
* Unified single post composition (legacy-style closed surface).
*
* single.php stays a thin shell. All article assembly lives here.
*
@@ -33,7 +33,7 @@ if (!function_exists('aksrt_single_build_context')) :
? aksrt_reading_minutes($post_id)
: 0;
// Zibll primary meta = comment/views/likes via meta_box_html.
// legacy primary meta = comment/views/likes via meta_box_html.
$meta_items = [];
$meta_box_html = function_exists('aksrt_get_single_meta_box')
? aksrt_get_single_meta_box('abs-right', 'down', $post_id)
@@ -63,7 +63,7 @@ if (!function_exists('aksrt_single_build_context')) :
$paid_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_paid_content_settings() : [];
$paid_display = is_array($paid_settings['display'] ?? null) ? $paid_settings['display'] : [];
$paid_box_position = sanitize_key((string) ($paid_display['box_position'] ?? 'top'));
// Zibll positions: box_top | top | bottom | box_bottom (do not collapse).
// legacy positions: box_top | top | bottom | box_bottom (do not collapse).
if (!in_array($paid_box_position, ['box_top', 'top', 'bottom', 'box_bottom'], true)) {
$paid_box_position = 'top';
}
@@ -96,7 +96,7 @@ if (!function_exists('aksrt_single_build_context')) :
? aksrt_get_post_allow_view_data($post_id)
: ['allow' => true];
if (empty($allow_view['allow'])) {
// Zibll: pay box is skipped when allow_view denies.
// legacy: pay box is skipped when allow_view denies.
$show_pay_box = false;
}
@@ -182,7 +182,7 @@ endif;
if (!function_exists('aksrt_single')) :
/**
* Compose header + article + after-box (Zibll zib_single equivalent).
* Compose header + article + after-box (legacy equivalent).
*
* @param array<string,mixed>|null $ctx Optional prebuilt context.
*/
+2 -2
View File
@@ -2,7 +2,7 @@
/**
* AKSRT Slider Helper — 轮播渲染函数
*
* 对标 zibll 的 zib_new_slider(),提供服务端轮播 HTML 生成。
* 对标 legacy 的 legacy(),提供服务端轮播 HTML 生成。
* 支持 data-* 属性驱动配置、视差、懒加载、缩略图分页。
*
* @package AKSRT
@@ -92,7 +92,7 @@ function aksrt_render_slider(array $args = []): string {
// 高度样式
$height_style = '';
if ($args['scale_height']) {
// padding-bottom percentage for ratio box (Zibll graphic cover style).
// padding-bottom percentage for ratio box (legacy graphic cover style).
$ratio_pct = max(10, min(100, (float) $args['scale_ratio'] * 100));
$height_style = sprintf(
'--pc-height:auto;--m-height:auto;--scale-ratio:%s;padding-bottom:%s%%;',
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* Shared user-card / author-card render helpers (zibll zib_get_user_card_box parity).
* Shared user-card / author-card render helpers (legacy parity).
*
* @package AKSRT
*/
+1 -1
View File
@@ -76,7 +76,7 @@ function aksrt_get_user_dashboard_view(int $user_id, array $args = []): array {
? \AKSRT\Settings\Settings::get_currency_name()
: __('积分', 'aksrt');
// Cash wallet (Zibll pay_balance) — separate from points.
// Cash wallet (legacy pay_balance) — separate from points.
$balance_enabled = $is_own_profile && class_exists('\AKSRT\Credits\Balance') && \AKSRT\Credits\Balance::enabled();
$wallet_balance = $balance_enabled ? \AKSRT\Credits\Balance::balance($user_id) : 0.0;
+1 -1
View File
@@ -93,7 +93,7 @@ if (!function_exists('aksrt_get_user_home_page_context')) {
'comments' => __('评论', 'aksrt'),
'favorites' => __('收藏', 'aksrt'),
'credits' => sprintf(__('我的%s', 'aksrt'), $currency_name),
'follow' => __('粉丝', 'aksrt'), // Zibll: 粉丝
'follow' => __('粉丝', 'aksrt'), // legacy: 粉丝
];
foreach ($visible_tabs as $tab_key => $tab_config) {
if (!empty($tab_config['label'])) {
+4 -4
View File
@@ -206,7 +206,7 @@ function aksrt_get_vip_badge_text(int $user_id = 0): string {
/**
* Daily free-download limit for a user (0 = unlimited).
* Aligns with zibll pay_download_limit / pay_download_limit_vip_{n}.
* Aligns with legacy pay_download_limit / pay_download_limit_vip_{n}.
*/
if (!function_exists('aksrt_get_user_free_download_limit')) {
function aksrt_get_user_free_download_limit(int $user_id = 0): int {
@@ -231,7 +231,7 @@ if (!function_exists('aksrt_get_user_free_download_limit')) {
}
/**
* Count free downloads used today for a user (zibll pay_down_number).
* Count free downloads used today for a user (legacy pay_down_number).
*/
if (!function_exists('aksrt_get_user_free_downloaded_number')) {
function aksrt_get_user_free_downloaded_number(int $user_id = 0): int {
@@ -252,7 +252,7 @@ if (!function_exists('aksrt_get_user_free_downloaded_number')) {
}
/**
* Record a free download for daily quota (zibll pay_down_number).
* Record a free download for daily quota (legacy pay_down_number).
*/
if (!function_exists('aksrt_record_user_free_download')) {
function aksrt_record_user_free_download(int $user_id, int $post_id): void {
@@ -305,7 +305,7 @@ if (!function_exists('aksrt_check_free_download_quota')) {
'limit' => $limit,
'used' => $used,
];
// Optional overbuy price for free-quota exhausted (Zibll download_limit_over_price).
// Optional overbuy price for free-quota exhausted (legacy download_limit_over_price).
// Callers may pass post context via filter.
$over = apply_filters('aksrt_download_limit_over_price', 0.0, $user_id);
if ($over > 0) {
+3 -3
View File
@@ -1,6 +1,6 @@
<?php
/**
* Comment content filters — zibll-compatible shortcodes.
* Comment content filters — legacy-compatible shortcodes.
*
* Supports [g=key] GIF smilies, [img=url], [code]...[/code].
*
@@ -11,7 +11,7 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_comment_smilie_keys')) :
/**
* Canonical zibll smilie keys (filename without .gif).
* Canonical legacy smilie keys (filename without .gif).
*
* @return array<int,string>
*/
@@ -96,7 +96,7 @@ endif;
if (!function_exists('aksrt_render_comment_content')) :
/**
* Filter comment body: smilies, images, code blocks (zibll parity).
* Filter comment body: smilies, images, code blocks (legacy parity).
*/
function aksrt_render_comment_content(string $content): string {
// [img=url]
+6 -6
View File
@@ -1,9 +1,9 @@
<?php
/**
* Comment form partials — virtual-input + expand toolbar (Zibll DOM contract).
* Comment form partials — virtual-input + expand toolbar (legacy DOM contract).
*
* Mirrors zib_get_respond_mobile() and zib_get_input_expand_but()
* from zibll/inc/functions.
* Mirrors legacy() and legacy()
* from legacy/inc/functions.
*
* @package AKSRT
*/
@@ -12,7 +12,7 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_get_comment_virtual_input_html')) :
/**
* Mobile virtual input bar (zibll: zib_get_respond_mobile).
* Mobile virtual input bar (legacy: legacy).
*
* @param string $placeholder Placeholder text.
* @param string $target CSS selector for the FixedInput target.
@@ -37,7 +37,7 @@ endif;
if (!function_exists('aksrt_get_input_expand_but')) :
/**
* zibll-style expand toolbar button + dropdown (zibll: zib_get_input_expand_but).
* legacy-style expand toolbar button + dropdown (legacy: legacy).
*
* @param string $type smilie|code|image|quick|link.
* @param mixed $arg1 Type-specific arg.
@@ -124,7 +124,7 @@ endif;
if (!function_exists('aksrt_render_comment_expand_toolbar')) :
/**
* Render left-side expand tools based on settings (zibll order: smilie/code/image/link/quick).
* Render left-side expand tools based on settings (legacy order: smilie/code/image/link/quick).
*
* @param array<string,mixed> $ctx Comments context.
*/
+12 -12
View File
@@ -1,9 +1,9 @@
<?php
/**
* Comment list item renderer — Zibll DOM contract (1:1).
* Comment list item renderer — legacy DOM contract (1:1).
*
* Mirrors zib_comments_list / zib_get_comment_header / zib_get_comment_footer
* from zibll/inc/functions/zib-comments-list.php.
* Mirrors legacy / legacy / legacy
* from the legacy comments-list module.
*
* @package AKSRT
*/
@@ -12,7 +12,7 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_get_comment_like_html')) :
/**
* Header like control (zibll: zib_get_comment_like).
* Header like control (legacy: legacy).
*
* @param WP_Comment $comment Comment.
* @param bool $enabled Like enabled.
@@ -43,7 +43,7 @@ endif;
if (!function_exists('aksrt_get_comment_avatar_box')) :
/**
* Comment avatar box (zibll: zib_get_comment_avatar_box).
* Comment avatar box (legacy: legacy).
*
* @param WP_Comment $comment Comment.
* @param string $class Classes for the avatar wrapper.
@@ -74,7 +74,7 @@ endif;
if (!function_exists('aksrt_get_comments_user_name_html')) :
/**
* Name row (zibll: zib_get_comments_user_name) — topping + author + badges.
* Name row (legacy: legacy) — topping + author + badges.
*
* @param WP_Comment $comment Comment.
* @param array<string,mixed> $settings Display settings.
@@ -118,7 +118,7 @@ endif;
if (!function_exists('aksrt_get_comment_header_html')) :
/**
* Comment header (zibll: zib_get_comment_header).
* Comment header (legacy: legacy).
*
* @param WP_Comment $comment Comment.
* @param array<string,mixed> $settings Settings.
@@ -142,7 +142,7 @@ endif;
if (!function_exists('aksrt_get_comments_action_dropdown_html')) :
/**
* More-actions menu (zibll: zib_get_comments_action_list) — pin / edit / approve / delete.
* More-actions menu (legacy: legacy) — pin / edit / approve / delete.
*
* @param WP_Comment $comment Comment.
* @param int $depth Depth.
@@ -158,7 +158,7 @@ if (!function_exists('aksrt_get_comments_action_dropdown_html')) :
if (!empty($perms['can_pin']) && (int) $comment->comment_parent === 0) {
$label = $is_pinned ? __('取消置顶', 'aksrt') : __('设置置顶', 'aksrt');
// 不带 zibll 的 wp-ajax-submit 类:vendor main.min.js 会全局代理该类并向
// 不带 legacy 的 wp-ajax-submit 类:vendor main.min.js 会全局代理该类并向
// admin-ajax 发空 action 请求(400 "0"),置顶走 data-comment-action REST。
$lists .= '<li><a class="comment-topping" data-comment-action="pin" data-pinned="' . ($is_pinned ? '1' : '0') . '" href="javascript:;"><i class="fa fa-thumbtack mr10 fa-fw" aria-hidden="true"></i>' . esc_html($label) . '</a></li>';
}
@@ -187,7 +187,7 @@ endif;
if (!function_exists('aksrt_get_comment_footer_html')) :
/**
* comt-meta row (zibll: zib_get_comment_footer).
* comt-meta row (legacy: legacy).
*
* @param WP_Comment $comment Comment.
* @param array $args wp_list_comments args.
@@ -256,7 +256,7 @@ endif;
if (!function_exists('aksrt_get_comments_list_html')) :
/**
* Single comment item HTML (zibll: zib_get_comments_list).
* Single comment item HTML (legacy: legacy).
*
* @param WP_Comment $comment Comment.
* @param array $args Args.
@@ -288,7 +288,7 @@ endif;
if (!function_exists('aksrt_comment_callback')) :
/**
* Canonical wp_list_comments callback (zibll: zib_comments_list).
* Canonical wp_list_comments callback (legacy: legacy).
*
* The closing </li> is emitted by the walker after children.
*
@@ -1,6 +1,6 @@
<?php
/**
* Layout-2 menu search remote panel (zibll menu_search / zib_get_search_box).
* Layout-2 menu search remote panel (legacy menu_search / legacy).
*
* @package AKSRT
*/
@@ -49,7 +49,7 @@ if (!function_exists('aksrt_ajax_menu_search')) :
wp_die('0');
}
// zibll contract: outer dropdown + inner .search-input.
// legacy contract: outer dropdown + inner .search-input.
echo '<div class="dropdown-menu hover-show-con">' . $search . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
wp_die();
}
@@ -57,7 +57,7 @@ endif;
if (!function_exists('aksrt_ajax_search_box')) :
/**
* AJAX: full Zibll search box loaded into the footer shell on first open.
* AJAX: full legacy search box loaded into the footer shell on first open.
*/
function aksrt_ajax_search_box(): void {
$nonce = isset($_REQUEST['nonce'])
@@ -81,7 +81,7 @@ endif;
if (!function_exists('aksrt_footer_navbar_search')) :
/**
* Zibll footer search shell. The heavy search body is loaded once via remote-box.
* legacy footer search shell. The heavy search body is loaded once via remote-box.
*/
function aksrt_footer_navbar_search(): void {
$show_on_404 = class_exists('\\AKSRT\\Settings\\Settings')
@@ -110,9 +110,9 @@ if (!function_exists('aksrt_footer_navbar_search')) :
}
endif;
if (!function_exists('aksrt_ajax_zibll_current_user_ping')) :
if (!function_exists('aksrt_ajax_legacy_current_user_ping')) :
/** Satisfy the reference runtime's one-shot user-state refresh request. */
function aksrt_ajax_zibll_current_user_ping(): void {
function aksrt_ajax_legacy_current_user_ping(): void {
wp_send_json_success([
'logged_in' => is_user_logged_in(),
'user_id' => get_current_user_id(),
@@ -124,6 +124,6 @@ add_action('wp_ajax_menu_search', 'aksrt_ajax_menu_search');
add_action('wp_ajax_nopriv_menu_search', 'aksrt_ajax_menu_search');
add_action('wp_ajax_search_box', 'aksrt_ajax_search_box');
add_action('wp_ajax_nopriv_search_box', 'aksrt_ajax_search_box');
add_action('wp_ajax_get_current_user', 'aksrt_ajax_zibll_current_user_ping');
add_action('wp_ajax_nopriv_get_current_user', 'aksrt_ajax_zibll_current_user_ping');
add_action('wp_ajax_get_current_user', 'aksrt_ajax_legacy_current_user_ping');
add_action('wp_ajax_nopriv_get_current_user', 'aksrt_ajax_legacy_current_user_ping');
add_action('wp_footer', 'aksrt_footer_navbar_search', 10);
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* Mobile drawer (zibll zib_nav_mobile + mobile-header shell).
* Mobile drawer (legacy + mobile-header shell).
*
* @package AKSRT
*/
+7 -7
View File
@@ -1,6 +1,6 @@
<?php
/**
* Desktop navbar pieces (zibll navbar header / menu / buttons).
* Desktop navbar pieces (legacy navbar header / menu / buttons).
*
* @package AKSRT
*/
@@ -9,7 +9,7 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_menu_items')) :
/**
* PC top menu (zibll zib_menu_items).
* PC top menu (legacy).
*
* @param string $location Menu location.
* @param bool $echo Echo or return.
@@ -56,7 +56,7 @@ endif;
if (!function_exists('aksrt_navbar_header')) :
/**
* Logo + mobile toggles (zibll zib_navbar_header).
* Logo + mobile toggles (legacy).
*
* @param array<string,mixed> $ctx
*/
@@ -87,7 +87,7 @@ endif;
if (!function_exists('aksrt_get_menu_search')) :
/**
* Layout-2 inline search form (zibll zib_get_menu_search simplified).
* Layout-2 inline search form (legacy simplified).
*
* @param array<string,mixed> $ctx
*/
@@ -97,7 +97,7 @@ if (!function_exists('aksrt_get_menu_search')) :
}
$placeholder = (string) ($ctx['search_placeholder'] ?? __('搜索内容', 'aksrt'));
// zibll: form + input + remote-box (action=menu_search).
// legacy: form + input + remote-box (action=menu_search).
echo '<form method="get" class="navbar-form navbar-left hover-show" action="' . esc_url(home_url('/')) . '">';
echo '<div class="form-group relative dropdown">';
echo '<input type="text" class="form-control search-input focus-show" name="s" value="'
@@ -213,7 +213,7 @@ if (!function_exists('aksrt_header_user_box_html')) :
$href .= '<a rel="nofollow" target="_blank" href="' . esc_url((string) $ctx['theme_settings_url']) . '">';
$href .= '<div class="badg mb6 toggle-radius c-yellow"><i class="fa fas fa-sliders-h" aria-hidden="true"></i></div>';
$href .= '<div class="c-yellow">' . esc_html__('主题设置', 'aksrt') . '</div></a>';
// zibll: 模块布局 → widgets.
// legacy: 模块布局 → widgets.
$href .= '<a rel="nofollow" target="_blank" href="' . esc_url(admin_url('widgets.php')) . '">';
$href .= '<div class="badg mb6 toggle-radius c-yellow"><i class="fa fas fa-chart-pie" aria-hidden="true"></i></div>';
$href .= '<div class="c-yellow">' . esc_html__('模块布局', 'aksrt') . '</div></a>';
@@ -278,7 +278,7 @@ endif;
if (!function_exists('aksrt_menu_button')) :
/**
* Right cluster: fold, publish/VIP, theme, user, search (zibll zib_menu_button).
* Right cluster: fold, publish/VIP, theme, user, search (legacy).
*
* @param array<string,mixed> $ctx
*/
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* Header shell orchestration (zibll zib_header contract).
* Header shell orchestration (legacy contract).
*
* @package AKSRT
*/
+3 -3
View File
@@ -1,9 +1,9 @@
<?php
/**
* Zibll header slider visibility and rendering.
* legacy header slider visibility and rendering.
*
* This is the only header-slider rendering path. It consumes the original
* Zibll option IDs and the serialized page_config post meta contract.
* legacy option IDs and the serialized page_config post meta contract.
*
* @package AKSRT
*/
@@ -373,7 +373,7 @@ if (!function_exists('aksrt_get_header_slider_markup')) {
$controls .= '<div class="swiper-pagination kaoyou' . esc_attr($pagination_class) . '"></div>';
}
return '<div class="relative zib-slider"><div class="new-swiper ' . esc_attr(trim($class)) . '"' . $attrs . ' style="' . esc_attr($style) . '"><div class="swiper-wrapper">'
return '<div class="relative aksrt-slider"><div class="new-swiper ' . esc_attr(trim($class)) . '"' . $attrs . ' style="' . esc_attr($style) . '"><div class="swiper-wrapper">'
. $slides_html . '</div>' . $controls . '</div></div>';
}
}
+2 -2
View File
@@ -9,9 +9,9 @@ defined('ABSPATH') || exit;
if (!function_exists('aksrt_homepage_render_layout')) {
/**
* Render the fixed homepage layout (Zibll latest-first content stream).
* Render the fixed homepage layout (legacy latest-first content stream).
*
* Order (zibll-aligned):
* Order (legacy-aligned):
* fluid top → main.container → top content → tabs/list → bottom content → sidebar
* → fluid bottom. Hero/header-slider is rendered from header.php, not here.
*/
+4 -4
View File
@@ -1,6 +1,6 @@
<?php
/**
* Menu decoration helpers — Zibll's zib_menu_options contract.
* Menu decoration helpers — legacy's aksrt_menu_options contract.
*
* @package AKSRT
*/
@@ -8,7 +8,7 @@
defined('ABSPATH') || exit;
/**
* Read one menu item option from post meta zib_menu_options.
* Read one menu item option from post meta aksrt_menu_options.
*
* @param int $id Menu item ID.
* @param string $key Option key.
@@ -18,7 +18,7 @@ defined('ABSPATH') || exit;
function aksrt_menu_pz(int $id, string $key = '', $default = '') {
static $options = [];
if (!isset($options[$id])) {
$raw = get_post_meta($id, 'zib_menu_options', true);
$raw = get_post_meta($id, 'aksrt_menu_options', true);
$options[$id] = is_array($raw) ? $raw : [];
}
if ($key === '') {
@@ -52,7 +52,7 @@ function aksrt_render_menu_icon(string $icon_class, bool $enabled = true): strin
if (!$enabled || $icon_class === '') {
return '';
}
// Zibll uses the Font Awesome 5 `fa` prefix.
// legacy uses the Font Awesome 5 `fa` prefix.
if (strpos($icon_class, 'fa') === false) {
$icon_class = 'fa fas fa-' . ltrim($icon_class, '-');
} elseif (strpos($icon_class, 'fa-') === 0 && strpos($icon_class, ' ') === false) {
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
/**
* Zibll 9.0 article-list configuration and image resolution.
* legacy 9.0 article-list configuration and image resolution.
*
* @package AKSRT
*/
@@ -31,7 +31,7 @@ if (!function_exists('aksrt_renderer_defaults')) {
if (!function_exists('aksrt_renderer_config')) {
/**
* Resolve the one canonical Zibll list/card decision matrix.
* Resolve the one canonical legacy list/card decision matrix.
*
* @param array<string,mixed> $args Caller arguments.
* @return array<string,mixed>
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
/**
* Zibll 9.0 article-list DOM contract.
* legacy 9.0 article-list DOM contract.
*
* @package AKSRT
*/
@@ -130,7 +130,7 @@ if (!function_exists('aksrt_render_post_list')) {
/**
* Render the canonical article stream.
*
* @param array<string,mixed> $args Zibll-shaped list arguments.
* @param array<string,mixed> $args legacy-shaped list arguments.
* @param WP_Query|null $query Optional custom query.
*/
function aksrt_render_post_list(array $args = [], ?WP_Query $query = null, bool $echo = true): string {
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
/**
* Zibll 9.0 article-list data and markup fragments.
* legacy 9.0 article-list data and markup fragments.
*
* @package AKSRT
*/
@@ -127,7 +127,7 @@ if (!function_exists('aksrt_renderer_thumb')) {
$content .= '<div class="video-thumb"><div class="dplayer dplayer-thumb"><video playsinline loop preload="none"' . ($muted ? ' muted' : '') . ' data-src="' . esc_url((string) $data['video_url']) . '"></video></div></div></div>';
$format_icon = '<i class="fa fas fa-play-circle em12 mt6 c-white opacity8" aria-hidden="true"></i>';
} elseif ($has_slides) {
$content .= '<div class="relative zib-slider"><div class="new-swiper item-thumbnail' . ($is_contain ? ' gradient-background' : '') . '" data-loop="true" data-effect="slide" data-autoplay="1" data-post-thumb-slider><div class="swiper-wrapper">';
$content .= '<div class="relative aksrt-slider"><div class="new-swiper item-thumbnail' . ($is_contain ? ' gradient-background' : '') . '" data-loop="true" data-effect="slide" data-autoplay="1" data-post-thumb-slider><div class="swiper-wrapper">';
foreach ((array) $data['slides'] as $image) {
$content .= '<div class="swiper-slide' . ($is_contain ? ' gradient-bg' : '') . '"' . ($is_contain ? ' data-opacity="0.2"' : '') . '><a' . $target . ' href="' . esc_url((string) $data['permalink']) . '"><img' . aksrt_get_lazy_attr('lazy_posts_thumb', (string) $image, 'radius8') . ' alt="' . esc_attr((string) $data['title']) . '"></a></div>';
}
+5 -5
View File
@@ -1,6 +1,6 @@
<?php
/**
* Search box markup (zibll zib_get_search_box parity).
* Search box markup (legacy parity).
*
* Used by layout-2 menu_search AJAX panel and layout 1/3 .navbar-search.
*
@@ -10,7 +10,7 @@
defined('ABSPATH') || exit;
if (!function_exists('aksrt_save_history_search')) :
/** Store the Zibll history_search cookie (newest first, maximum thirty). */
/** Store the legacy history_search cookie (newest first, maximum thirty). */
function aksrt_save_history_search(string $search): void {
$search = trim(wp_strip_all_tags($search));
$search_text = aksrt_get_search_keywords_text($search);
@@ -36,7 +36,7 @@ if (!function_exists('aksrt_save_history_search')) :
endif;
if (!function_exists('aksrt_get_main_search')) :
/** Zibll main-search defaults backed only by the reference option IDs. */
/** legacy main-search defaults backed only by the reference option IDs. */
function aksrt_get_main_search(array $args = [], bool $echo = false) {
$settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
$search_cat = !array_key_exists('search_cat', $settings) || !empty($settings['search_cat']);
@@ -139,7 +139,7 @@ endif;
if (!function_exists('aksrt_get_search_box')) :
/**
* zibll-compatible search box.
* legacy-compatible search box.
*
* @param array<string,mixed> $args
* @param bool $echo
@@ -360,7 +360,7 @@ endif;
if (!function_exists('aksrt_get_remote_box')) :
/**
* Lazy remote HTML mount (zibll zib_get_remote_box).
* Lazy remote HTML mount (legacy).
*
* @param array<string,mixed> $args
*/
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* Search panel hot posts (zibll zib_get_search_posts parity).
* Search panel hot posts (legacy parity).
*
* @package AKSRT
*/
+5 -5
View File
@@ -9,12 +9,12 @@ defined('ABSPATH') || exit;
// ============================================================
// 模板标签:图标覆盖卡片(顶部多功能组件叠加层)
// 完全模仿 zibll 的 zib_icon_cover_card
// 完全模仿 legacy 的 legacy
// ============================================================
if (!function_exists('aksrt_render_icon_cover_card')):
/**
* 渲染单个图标覆盖卡片(模仿 zibll 的 zib_icon_cover_card)
* 渲染单个图标覆盖卡片(模仿 legacy 的 legacy)
*
* 结构:左侧圆形/方形图标 + 右侧标题和描述
*
@@ -30,7 +30,7 @@ if (!function_exists('aksrt_render_icon_cover_card')):
* @return string HTML
*/
function aksrt_render_icon_cover_card(array $card): string {
// Prefer canonical zibll-aligned renderer.
// Prefer canonical legacy-aligned renderer.
if (function_exists('aksrt_icon_cover_card')) {
return aksrt_icon_cover_card($card);
}
@@ -63,7 +63,7 @@ function aksrt_render_icon_cover_card(array $card): string {
$text_html .= '</div>';
$card_inner = $icon_container . $text_html;
$cls = 'icon-cover-card flex ac ' . esc_attr((string) ($card['class'] ?? 'zib-widget'));
$cls = 'icon-cover-card flex ac ' . esc_attr((string) ($card['class'] ?? 'aksrt-panel'));
if ($url !== '') {
return '<a class="main-color" ' . ($tgt !== '' ? ltrim($tgt) . ' ' : '') . 'href="' . esc_url((string) $url) . '"><div class="' . $cls . '">' . $card_inner . '</div></a>';
@@ -189,7 +189,7 @@ endif;
if (!function_exists('aksrt_get_adaptive_theme_img')):
/**
* Build a single light/dark adaptive image (Zibll white-src/dark-src contract).
* Build a single light/dark adaptive image (legacy white-src/dark-src contract).
*
* theme.js syncThemeImages() swaps src via white-src / dark-src attributes.
*
@@ -15,7 +15,7 @@ if (!function_exists('aksrt_render_pagination')) {
/**
* 渲染文章列表分页(根据后台配置选择模式)。
*
* Zibll 对齐:numbered = 数字分页按钮;load_more/infinite = AJAX 追加。
* legacy 对齐:numbered = 数字分页按钮;load_more/infinite = AJAX 追加。
*
* @param WP_Query|null $query 可选,传入自定义查询对象;默认用主查询。
* @param array<string,mixed> $args {
@@ -215,7 +215,7 @@ function aksrt_is_crawler() {
}
/**
* Determine whether one Zibll-style lazy-loading scope is enabled.
* Determine whether one legacy-style lazy-loading scope is enabled.
*/
function aksrt_is_lazy(string $key, bool $default = false): bool {
if (aksrt_is_crawler()) {
@@ -268,7 +268,7 @@ function aksrt_get_lazy_attr(string $key, string $src, string $class = '', strin
}
/**
* Remove Zibll-style lazy attributes from a rendered image string.
* Remove legacy-style lazy attributes from a rendered image string.
*/
function aksrt_str_remove_lazy(string $html = ''): string {
$pattern = "/<img(.*?)src=('|\")(.*?)('|\") data-src=('|\")(.*?)('|\")(.*?)>/i";
@@ -277,7 +277,7 @@ function aksrt_str_remove_lazy(string $html = ''): string {
}
/**
* Convert post-content images to the same lazySizes contract as Zibll.
* Convert post-content images to the same lazySizes contract as legacy.
*/
function aksrt_lazy_content_images(string $content): string {
if ((is_admin() && !wp_doing_ajax()) || !aksrt_is_lazy('lazy_posts_content')) {
@@ -381,7 +381,7 @@ endif;
if (!function_exists('aksrt_should_use_footer_tabbar_single_extend')) :
/**
* Whether single-post extended footer tabbar should replace the default items.
* Zibll: footer_tabbar_single.s === extend && is_single(post).
* legacy: footer_tabbar_single.s === extend && is_single(post).
*/
function aksrt_should_use_footer_tabbar_single_extend(): bool {
if (!is_singular('post')) {
+4 -4
View File
@@ -280,7 +280,7 @@ endif;
if (!function_exists('aksrt_get_search_facets_data')):
/**
* Resolve the configured Zibll search facets to ordered term data.
* Resolve the configured legacy search facets to ordered term data.
*
* @return array<string,array<int,array{id:int,name:string,taxonomy:string}>>
*/
@@ -350,7 +350,7 @@ function aksrt_get_search_filter_url(array $changes): string {
endif;
if (!function_exists('aksrt_get_search_orderby_lists')):
/** Render the Zibll search ordering row. */
/** Render the legacy search ordering row. */
function aksrt_get_search_orderby_lists(string $type): string {
$options = [
'post' => [
@@ -491,7 +491,7 @@ endif;
if (!function_exists('aksrt_render_comment_pagination')) {
/**
* 渲染评论列表分页(zibll 标记:数字 pagenav / ajax_lists 加载更多)
* 渲染评论列表分页(legacy 标记:数字 pagenav / ajax_lists 加载更多)
*/
function aksrt_render_comment_pagination(): void {
$settings = class_exists('\AKSRT\Settings\Settings')
@@ -544,7 +544,7 @@ if (!function_exists('aksrt_render_comment_pagination')) {
return;
}
// 数字分页(zibll:paginate_links + 跳页输入框)
// 数字分页(legacy:paginate_links + 跳页输入框)
$is_mobile = wp_is_mobile();
$args = [
'base' => add_query_arg('cpage', '%#%', get_permalink()),
+6 -6
View File
@@ -78,7 +78,7 @@ endif;
if (!function_exists('aksrt_get_post_show_layout')):
/**
* Zibll-compatible post/page layout override.
* legacy-compatible post/page layout override.
*
* Meta key: `_aksrt_show_layout`
* Values: '' (follow) | no_sidebar | sidebar_left | sidebar_right
@@ -122,7 +122,7 @@ endif;
if (!function_exists('aksrt_is_show_sidebar')):
/**
* Zibll-strict sidebar visibility (settings + post meta, not widget presence).
* legacy-strict sidebar visibility (settings + post meta, not widget presence).
*
* Filter: aksrt_is_show_sidebar
*
@@ -136,7 +136,7 @@ endif;
if (!function_exists('aksrt_is_show_sidebar_filter')):
/**
* Core sidebar visibility decision (Zibll zib_is_show_sidebar_filter parity).
* Core sidebar visibility decision (legacy parity).
*/
function aksrt_is_show_sidebar_filter(): bool {
// Keep the sidebar in the document for every request. wp_is_mobile() is
@@ -148,7 +148,7 @@ function aksrt_is_show_sidebar_filter(): bool {
return false;
}
// Single / page: post meta can force show/hide (Zibll show_layout).
// Single / page: post meta can force show/hide (legacy show_layout).
if (is_singular()) {
$layout = aksrt_get_post_show_layout(get_queried_object_id());
if ($layout === 'no_sidebar') {
@@ -190,7 +190,7 @@ function aksrt_is_show_sidebar_filter(): bool {
}
// Scene switches above already gated; when enabled, show the column
// (widgets may be empty — matches zibll empty sidebar column policy).
// (widgets may be empty — matches legacy empty sidebar column policy).
if (is_home() || is_front_page()) {
return !empty($cfg['home']);
}
@@ -217,7 +217,7 @@ endif;
if (!function_exists('aksrt_get_site_layout')):
/**
* Zibll site-layout mode: 1=no sidebar, 2=right, 3=left.
* legacy site-layout mode: 1=no sidebar, 2=right, 3=left.
*/
function aksrt_get_site_layout(): int {
// User-center and public-profile routes have their own internal layouts.
@@ -1,6 +1,6 @@
<?php
/**
* Free points tasks list + daily free detail (Zibll points free tab).
* Free points tasks list + daily free detail (legacy points free tab).
*
* @package AKSRT
*/
@@ -1,6 +1,6 @@
<?php
/**
* User center: cash wallet (站内余额) — Zibll-like asset card.
* User center: cash wallet (站内余额) — legacy-like asset card.
*
* Expects extracted $context vars.
*
@@ -2,7 +2,7 @@
/**
* User center assets panel orchestrator (wallet + points).
*
* Zibll user-tab-balance parity: dual cards + tabbed ledgers.
* legacy user-tab-balance parity: dual cards + tabbed ledgers.
*
* @package AKSRT
*/
@@ -16,7 +16,7 @@ $dir = __DIR__;
$show_wallet = !empty($balance_enabled);
$show_credits = !empty($credits_enabled);
// Dual cards row (Zibll row gutters-10).
// Dual cards row (legacy row gutters-10).
if ($show_wallet || $show_credits) :
?>
<div class="uc-assets-row<?php echo ($show_wallet && $show_credits) ? ' uc-assets-row--dual' : ''; ?>">
@@ -46,7 +46,7 @@ if ($show_wallet || $show_credits) {
require $dir . '/transfer-modal.php';
}
// Tabbed ledgers (Zibll record tabs).
// Tabbed ledgers (legacy record tabs).
if ($show_wallet || $show_credits) :
$active_record = $show_wallet ? 'balance' : 'points';
$show_tasks = $show_credits && class_exists('\AKSRT\Credits\PointsFree') && \AKSRT\Credits\PointsFree::enabled();
@@ -58,7 +58,7 @@ extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_
</span>
<?php endif; ?>
<?php
// IP 归属地 (zibll user_page_header_desc + user_city_s).
// IP 归属地 (legacy user_page_header_desc + user_city_s).
$uc_city = function_exists('aksrt_get_user_city_badge_html')
? aksrt_get_user_city_badge_html((int) $user_id, 'user_center', 'badg')
: '';
@@ -28,7 +28,7 @@ $today_integral = max(0, (int) ($date_details[$today] ?? 0));
$day_max = \AKSRT\User\Level::day_max();
?>
<div class="uc-level-page">
<section class="uc-level-hero zib-widget">
<section class="uc-level-hero aksrt-panel">
<div class="uc-level-hero__identity">
<div class="uc-level-hero__icon">
<?php echo \AKSRT\User\Level::get_badge_html($user_id); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
@@ -52,7 +52,7 @@ $day_max = \AKSRT\User\Level::day_max();
</div>
</section>
<section class="uc-level-section zib-widget">
<section class="uc-level-section aksrt-panel">
<div class="uc-level-section__head"><h3><?php esc_html_e('成长路线', 'aksrt'); ?></h3><span><?php printf(esc_html__('最高 %d 级', 'aksrt'), (int) $cfg['max']); ?></span></div>
<div class="uc-level-road">
<?php for ($level = 1; $level <= (int) $cfg['max']; $level++) :
@@ -72,7 +72,7 @@ $day_max = \AKSRT\User\Level::day_max();
</div>
</section>
<section class="uc-level-section zib-widget">
<section class="uc-level-section aksrt-panel">
<div class="uc-level-section__head"><h3><?php esc_html_e('获取经验值', 'aksrt'); ?></h3><span><?php esc_html_e('完成互动即可成长', 'aksrt'); ?></span></div>
<div class="uc-level-methods">
<?php
@@ -97,7 +97,7 @@ $day_max = \AKSRT\User\Level::day_max();
</section>
<div class="uc-level-history-grid">
<section class="uc-level-section zib-widget">
<section class="uc-level-section aksrt-panel">
<div class="uc-level-section__head"><h3><?php esc_html_e('经验明细', 'aksrt'); ?></h3><span><?php esc_html_e('最近 50 条', 'aksrt'); ?></span></div>
<?php if ($details) : ?>
<div class="uc-level-ledger">
@@ -117,7 +117,7 @@ $day_max = \AKSRT\User\Level::day_max();
<?php endif; ?>
</section>
<section class="uc-level-section zib-widget">
<section class="uc-level-section aksrt-panel">
<div class="uc-level-section__head"><h3><?php esc_html_e('每日经验', 'aksrt'); ?></h3><span><?php esc_html_e('最近 30 天', 'aksrt'); ?></span></div>
<?php if ($date_details) : ?>
<div class="uc-level-dates">
@@ -1,6 +1,6 @@
<?php
/**
* User center VIP tab (zibll 我的会员 1:1 structure).
* User center VIP tab (legacy 我的会员 1:1 structure).
*
* Expects extracted $context vars via profile-vip.php / capture path.
*
@@ -14,7 +14,7 @@ if (empty($vip_settings['enabled']) && class_exists('\AKSRT\Settings\Settings'))
$vip_settings = \AKSRT\Settings\Settings::get_payment_vip_settings();
}
if (empty($vip_settings['enabled'])) {
echo '<div class="zib-widget padding-20 muted-2-color">' . esc_html__('会员功能未启用。', 'aksrt') . '</div>';
echo '<div class="aksrt-panel padding-20 muted-2-color">' . esc_html__('会员功能未启用。', 'aksrt') . '</div>';
return;
}
@@ -147,7 +147,7 @@ foreach ([1, 2] as $lv) {
$cta = sprintf(__('续费%s', 'aksrt'), $lv_name);
}
$cards .= '<div class="zib-widget text-center pay-vip-info flex1 level-' . $lv . ' uc-vip-level-card">';
$cards .= '<div class="aksrt-panel text-center pay-vip-info flex1 level-' . $lv . ' uc-vip-level-card">';
$cards .= '<div class="relative uc-vip-level-card__inner">';
$cards .= '<div class="v-iconbox mb10 flex jc ac">';
$cards .= '<div class="v-icon flex jc ac">' . $lv_icon . '</div>';
+1 -1
View File
@@ -62,7 +62,7 @@ $_aksrt_special_templates = [
],
];
// Zibll-style v2 routing keeps only true fixed template pages in the registry.
// legacy-style v2 routing keeps only true fixed template pages in the registry.
$_aksrt_special_templates = [
'sign' => [
'file' => 'templates/pages/page-sign.php',