chore(branding): remove leftover upstream theme identifiers

The theme was renamed Zibll/子比 → AKSRT → Jio, but upstream branding
survived the sweeps in CSS classes, the SVG sprite prefix, a persisted
widget field ID, JS events, admin Vue class names, test infrastructure
and docblocks.

Renames:
- zib-widget / zib-widget-wrap / zib-slider → jio-widget-box /
  jio-widget-box-wrap / jio-slider-box (jio-widget is taken by the modern
  widget shell, jio-box-* by the card primitives)
- zib-partners-scroll + zps-* → jio-partners-scroll + jps-*
- zib-combo-info-card + zci-* → jio-combo-info-card + jci-*
- zibsvg- → jiosvg-, including the exported picker helpers and the
  fa-zibsvg- family-prefix guard
- zibpay_type → pay_type; the dual-read fallback in PostQuery collapses
  to a single key
- [zibajax="submit"] dropped (no PHP emitter); zib_ajax.success →
  jio_ajax.success
- aks-* admin Vue classes → jio-*
- zib_palette() → palette()

User-facing vendor traces are gone: the floating "more" button default no
longer ships a zibll.com link or 子比主题 marketing copy, the notice
widget ships no preset promo entries, and the four 官网教程 links are
removed from the post-list admin schema.

Test infrastructure renamed to neutral names (docker-compose.reference.yml,
Caddyfile, article-baseline.json, modern-widgets-contract.test.cjs) with
their DB/volume/env/slug identifiers following.

Kept intentionally, documented in tests/fixtures/README.md: the golden
fixture reference fingerprint (a SHA-256 record of an external directory,
read by validate-widget-golden / generate-widget-golden-fixture /
audit-widget-system), the doesNotMatch guards that prove the old tokens are
gone, and the reference theme's own meta key in the visual fixtures.

No backward-compat or data migration: saved widget configs holding old
icon keys or the old field ID silently lose them, per the project's
rewrite-over-compatibility rule.

Verified: 132/132 node contract tests, php tests/widget-system/run.php
(146 assertions), audit-admin-contracts, audit-psr4-paths and
validate-widget-golden all green; tracked bundles regenerated and in sync.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Opus 5 committed 2026-11-02 00:06:54 +08:00
1 parent 42cc64106d
commit 427968a721
188 files changed
+915 -967

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ class Admin {
jio_enqueue_fontawesome();
// Frontend SVG sprite (defines window.jio_svgs and injects the symbol
// sheet) so schema icon fields can preview built-in zibsvg values.
// sheet) so schema icon fields can preview built-in jiosvg values.
wp_enqueue_script(
'jio-svg-sprite',
get_template_directory_uri() . '/assets/js/runtime/svg-icon.js',
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* @package Jio
*
* 后台列表页分页条 —— 1:1 复刻「卡密管理」页的 zibpay_admin_pagenavi 结构。
* 后台列表页分页条 —— 沿用「卡密管理」页的翻页结构。
*
* 支付中心各页面(订单明细 / 付费文章 / 优惠码 / 创作分成 / 提现审核 / 卡密管理)
* 原先各写一份几乎相同的翻页代码。这里统一到一处,标记沿用卡密管理那一套:
+5 -5
View File
@@ -2,12 +2,12 @@
/**
* @package Jio
*
* 后台「卡密管理」页面 — 1:1 复刻参考主题 zibll 的 zibpay/page/charge-card.php。
* 后台「卡密管理」页面。
*
* 结构:列表(过滤/搜索/排序/批量删除/分页) + 添加卡密(自动生成 / 导入) + 导出卡密(text / xls)。
* 卡密类型与参考主题一致:余额充值 / 会员兑换 / 积分兑换 / 自定义卡密;
* 卡密类型:余额充值 / 会员兑换 / 积分兑换 / 自定义卡密;
* 本主题内部类型映射:balance / vip / credits / custom。
* 差异点:Jio 无商城发货(shipped)子系统,故不含「已售」标记与链接;删除取代参考主题的批量操作语义一致。
* 差异点:Jio 无商城发货(shipped)子系统,故不含「已售」标记与链接。
*
* 外壳与配色走 NativeUi(.jio-native),页面专属交互样式仍由 print_assets() 输出。
* 类体按关注点拆成 flat sibling traits(PSR-4 要求 trait 与宿主类同目录,不能放子目录):
@@ -114,7 +114,7 @@ class PayChargeCards {
}
/**
* 导出处理(参考主题 zibpay_ajax_card_pass_export 同款行为)。
* 导出处理。
*/
public function handle_export(): void {
if (!current_user_can(self::CAPABILITY)) {
@@ -193,7 +193,7 @@ class PayChargeCards {
}
/**
* 导出 xls(参考主题 zib_export_excel 同款行为,GB2312 编码保证 Excel 兼容)。
* 导出 xls(GB2312 编码保证 Excel 兼容)。
*
* @param array<int,array<int,string>> $data
* @param array<int,string> $title
+3 -3
View File
@@ -10,8 +10,8 @@ defined('ABSPATH') || exit;
/**
* 「支付&付费」设置 schema。
*
* 页面结构 1:1 复刻参考主题 Zibll 的「支付&付费」section(知识付费 / 余额充值 /
* VIP会员 / 创作分成 / 推广返佣 / 收款接口),并按产品需求新增「提现策略」子页。
* 页面结构:知识付费 / 余额充值 / VIP会员 / 创作分成 / 推广返佣 / 收款接口,
* 另含产品需求的「提现策略」子页。
* 收款接口仅保留支付宝、微信、PayPal、Stripe、易支付;订单、资金流水与提现
* 统一使用同一套流水号,无可配置前缀。
*/
@@ -678,7 +678,7 @@ class SchemaPayment {
}
/**
* 标签颜色调色板(参考主题 zib_palette(array(), array('b','jb')))。
* 标签颜色调色板(b / jb 前缀两类)。
*
* @return array<int,array<string,string>>
*/
+2 -2
View File
@@ -677,8 +677,8 @@ class SchemaProvider {
return wp_kses_post((string) $value);
case 'rich_html':
// Inline whitelist for card title/desc: `badge` is a custom
// element that wp_kses_post() would strip, but legacy (Zibll)
// renders such markup verbatim.
// element that wp_kses_post() would strip, but card title/desc
// render such markup verbatim.
return function_exists('jio_icon_card_kses')
? jio_icon_card_kses((string) $value)
: wp_kses_post((string) $value);
+5 -6
View File
@@ -286,7 +286,7 @@ class UserController extends ControllerBase {
'permission_callback' => [$this, 'check_permission'],
]);
// 前台禁封弹窗(1:1 复刻参考主题 set_user_ban_modal / zib_get_set_user_ban_modal)。
// 前台禁封弹窗。
// modal 内容每次拉取(restriction 状态可能已变),不缓存。
register_rest_route(self::API_NAMESPACE, '/user-ban/modal', [
'methods' => 'GET',
@@ -294,29 +294,28 @@ class UserController extends ControllerBase {
'permission_callback' => [$this, 'check_permission'],
]);
// 前台禁封 / 解封提交(对齐参考主题 wp_ajax_set_user_ban)。
// 前台禁封 / 解封提交。
register_rest_route(self::API_NAMESPACE, '/user-ban/set', [
'methods' => 'POST',
'callback' => [$this, 'set_user_ban'],
'permission_callback' => [$this, 'check_permission'],
]);
// 前台查看禁封状态弹窗(1:1 复刻参考主题 zib_get_ban_info_modal;
// 本人或管理员可见,权限在 helper 内判定)。
// 前台查看禁封状态弹窗(本人或管理员可见,权限在 helper 内判定)。
register_rest_route(self::API_NAMESPACE, '/user-ban/info-modal', [
'methods' => 'GET',
'callback' => [$this, 'get_user_ban_info_modal'],
'permission_callback' => static function () { return is_user_logged_in(); },
]);
// 前台禁封申诉弹窗(1:1 复刻参考主题 zib_get_user_ban_appeal_modal;仅本人)。
// 前台禁封申诉弹窗(仅本人)。
register_rest_route(self::API_NAMESPACE, '/user-ban/appeal-modal', [
'methods' => 'GET',
'callback' => [$this, 'get_user_ban_appeal_modal'],
'permission_callback' => static function () { return is_user_logged_in(); },
]);
// 前台禁封记录弹窗(1:1 复刻参考主题 zib_get_ban_log_modal;仅管理员)。
// 前台禁封记录弹窗(仅管理员)。
register_rest_route(self::API_NAMESPACE, '/user-ban/log-modal', [
'methods' => 'GET',
'callback' => [$this, 'get_user_ban_log_modal'],
@@ -81,8 +81,7 @@ trait UserControllerRestrictionOperations {
}
/**
* 前台禁封弹窗内容(1:1 复刻参考主题 zib_get_set_user_ban_modal,
* 经 jio_get_user_ban_modal 渲染;参考主题 refresh_modal 每次刷新同语义)。
* 前台禁封弹窗内容(经 jio_get_user_ban_modal 渲染,每次拉取最新状态)。
*/
public function get_user_ban_modal(\WP_REST_Request $request): \WP_REST_Response {
$user_id = (int) $request->get_param('user_id');
@@ -100,8 +99,8 @@ trait UserControllerRestrictionOperations {
}
/**
* 前台查看禁封状态弹窗内容(1:1 复刻参考主题 zib_get_ban_info_modal,
* 经 jio_get_user_ban_info_modal 渲染;本人或管理员可见)。
* 前台查看禁封状态弹窗内容(经 jio_get_user_ban_info_modal 渲染;
* 本人或管理员可见)。
*/
public function get_user_ban_info_modal(\WP_REST_Request $request): \WP_REST_Response {
$user_id = (int) $request->get_param('user_id');
@@ -119,8 +118,7 @@ trait UserControllerRestrictionOperations {
}
/**
* 前台禁封申诉弹窗内容(1:1 复刻参考主题 zib_get_user_ban_appeal_modal,
* 经 jio_get_user_ban_appeal_modal 渲染;仅本人可见)。
* 前台禁封申诉弹窗内容(经 jio_get_user_ban_appeal_modal 渲染;仅本人可见)。
*/
public function get_user_ban_appeal_modal(\WP_REST_Request $request): \WP_REST_Response {
$user_id = (int) $request->get_param('user_id');
@@ -138,8 +136,8 @@ trait UserControllerRestrictionOperations {
}
/**
* 前台禁封记录弹窗内容(1:1 复刻参考主题 zib_get_ban_log_modal,
* 经 jio_get_user_ban_log_modal 渲染;仅具备禁封权限的管理员可见)。
* 前台禁封记录弹窗内容(经 jio_get_user_ban_log_modal 渲染;
* 仅具备禁封权限的管理员可见)。
*/
public function get_user_ban_log_modal(\WP_REST_Request $request): \WP_REST_Response {
$user_id = (int) $request->get_param('user_id');
@@ -157,7 +155,7 @@ trait UserControllerRestrictionOperations {
}
/**
* 前台禁封 / 解封提交(1:1 复刻参考主题 zib_ajax_set_user_ban 语义):
* 前台禁封 / 解封提交:
* ban=0 解封(留言站内信);ban=1 拉入小黑屋 / ban=2 禁封用户,
* 支持禁封时长、预置/其它原因、禁封说明、删除全部内容、禁止申诉(含说明)。
*/
@@ -223,7 +221,7 @@ trait UserControllerRestrictionOperations {
]);
}
// 站内信(后台禁封表单 / 参考主题 zib_updata_user_ban_msg 同语义)。
// 站内信(与后台禁封表单同语义)。
$notice = $type === \Jio\User\Restriction::TYPE_BAN
? __('您的账号已被禁封,将无法登录。', 'jio')
: __('您已被拉入小黑屋,发布等相关权限已被限制。', 'jio');
+1 -2
View File
@@ -2,8 +2,7 @@
/**
* Upload limits, mime restrictions, auto-rename, and attachment page rules.
*
* Mirrors the reference theme's upload permission suite (zib-attachment.php):
* per-user-type size limits for image / video / file uploads, allow & prohibit
* Per-user-type size limits for image / video / file uploads, allow & prohibit
* mime lists, upload file renaming, and hiding attachment pages from guests.
*
* @package Jio
+1 -1
View File
@@ -229,7 +229,7 @@ final class OAuth {
}
/**
* Reference-parity social login block (legacy zib_social_login()).
* Social login block.
*
* Emits the muted separator plus a .social_loginbar of .social-login-item
* buttons, one per enabled provider. Returns '' when nothing is enabled.
+5 -7
View File
@@ -156,9 +156,9 @@ trait VipServiceModal {
}
/**
* 积分兑换会员弹窗(参考主题 zibpay_get_vip_points_exchange_modal 1:1 移植)。
* 积分兑换会员弹窗。
*
* 服务端静态输出参考主题 refresh_modal 同构外壳:
* 服务端静态输出刷新式弹窗外壳:
* .modal.flex.jc.fade > .modal-dialog.modal-mini.full-sm
* > .modal-content > .modal-body
* 与余额充值/购买积分弹窗同构(静止态由 vip-modal.css 显式隐藏,打开态由
@@ -242,13 +242,11 @@ trait VipServiceModal {
$desc_text = trim((string) ($vip['points_exchange']['desc'] ?? ''));
$desc = $desc_text !== ''
// 管理员编辑的富文本说明:保存端已 wp_kses_post,这里同级别输出
// (参考主题 zibpay_get_vip_points_exchange_modal 原样拼接)。
// (原样拼接)。
? '<div class="muted-box muted-2-color padding-10 em09 mt20 jio-vip-points-desc">' . wp_kses_post($desc_text) . '</div>'
: '';
// 最低价套餐仍超出用户积分 → 参考主题的 badg c-red btn-block 提示。
// (参考主题源码写作 `!$min_val > $user_points`,因运算符优先级恒假,
// 此处按其原意取真实比较,保证提示分支可达。)
// 最低价套餐仍超出用户积分 → badg c-red btn-block 提示。
if ($min_points > $user_points) {
$form = '<div class="mt20"><div class="badg c-red btn-block">'
. esc_html(sprintf(__('%s不足,暂时无法兑换', 'jio'), $currency))
@@ -290,7 +288,7 @@ trait VipServiceModal {
}
/**
* 积分兑换卡片等级图标(参考主题 zibpay_get_vip_card_icon)。
* 积分兑换卡片等级图标。
*
* @param array<string,mixed> $level_settings 等级设置(含 name / img_icon)。
*/
+1 -1
View File
@@ -229,7 +229,7 @@ trait FrontSubmitChunk {
];
}
/** 分片临时目录(参考主题为 wp-content/zib-temp,带 index.php 保护和 48h 清理)。 */
/** 分片临时目录(wp-content/jio-temp,带 index.php 保护和 48h 清理)。 */
private function chunk_temp_dir(): string {
$temp_dir = (string) apply_filters('jio_temp_dir', WP_CONTENT_DIR . '/jio-temp');
if (!@is_dir($temp_dir)) {
+2 -2
View File
@@ -473,10 +473,10 @@ trait ScriptsPart1c {
'debugLog' => defined('WP_DEBUG') && WP_DEBUG && defined('WP_DEBUG_LOG') && WP_DEBUG_LOG,
'postPaginationMode' => class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_post_pagination_mode() : 'load_more',
'commentPaginationMode' => class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_comment_pagination_mode() : 'numbered',
// AJAX 翻页文案(参考主题 zib__('load_more') / 'ajax_nomore')
// AJAX 翻页文案
'ajaxTrigger' => (class_exists('\Jio\Settings\Settings') && ($t = \Jio\Settings\Settings::get_post_list_style_settings()['ajax_trigger'] ?? '') !== '') ? $t : '<i class="fa fas fa-angle-right"></i>' . __('加载更多', 'jio'),
'ajaxNomore' => (class_exists('\Jio\Settings\Settings') && ($n = \Jio\Settings\Settings::get_post_list_style_settings()['ajax_nomore'] ?? '') !== '') ? $n : __('没有更多内容了', 'jio'),
// 骨架兜底文案,仅在没有 post_ajax_loader 时使用(参考主题 zib__('loading'))。
// 骨架兜底文案,仅在没有 post_ajax_loader 时使用。
'ajaxLoading' => __('加载中...', 'jio'),
'iasMax' => class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_post_list_style_settings()['ias_max'] : 3,
'commentIasAuto' => class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::get_comment_display_settings()['paging_ajax_ias'] : true,
+2 -2
View File
@@ -108,7 +108,7 @@ class TermMeta {
$description = (string) $term->description;
}
// 高级筛选(参考主题 zib-category.php 语义):cat 页按 cat_custom_filter 全量覆盖
// 分类高级筛选语义:cat 页按 cat_custom_filter 全量覆盖
// 筛选项目,未匹配或 tag 页回退默认配置,custom_filter_show 决定自定义筛选显示。
$page = $taxonomy === 'post_tag' ? 'tag' : 'cat';
$custom_filter = class_exists('\Jio\Settings\Settings')
@@ -203,7 +203,7 @@ class TermMeta {
}
// 自定义高级筛选维度 meta 过滤(参考主题 zib_sift_posts_per_page:meta_query LIKE;
// 自定义高级筛选维度 meta 过滤(meta_query LIKE;
// meta 值为序列化数组,用带引号精确匹配避免前缀误命中)。
if (!empty($settings['custom_filter_enabled'])) {
$keys = $settings['custom_filter_keys'];
+2 -2
View File
@@ -260,7 +260,7 @@ class Signin {
}
/**
* 签到详情弹窗 HTML(参考主题 zib_get_user_checkin_details_modal 1:1):
* 签到详情弹窗 HTML:
* 炫彩头部 + 用户卡片(我的{货币名}/我的等级)+ 每日签到奖励卡 + 连续签到奖励 7 天迷你卡。
*/
public function render_details_modal_html(int $user_id): string {
@@ -348,7 +348,7 @@ class Signin {
. '<span data-signin-label>' . esc_html__('立即签到', 'jio') . '</span></button>';
}
$card_1 = '<div class="zib-widget flex ac jsb">
$card_1 = '<div class="jio-widget-box flex ac jsb">
<div class="mr10">
<div class="em09 mb10">' . $gift_svg('mr6 em12') . esc_html__('每日签到奖励', 'jio') . '</div>
<div class="flex ac jsb">' . $reward_badge . '</div>
+1 -1
View File
@@ -3,7 +3,7 @@
* 网站安全:安全加固开关、内容防刷限制与验证错误频率限制。
*
* 对应后台「扩展&增强 → 网站安全」设置(ExtensionRuntime::get_security_settings()),
* 行为对齐参考主题 zib-theme.php / action/function.php 的安全套件。
* 行为对齐参考实现的安全套件。
*
* @package Jio
*/
+1 -1
View File
@@ -3,7 +3,7 @@
* 系统工具:WordPress 优化、上传优化与编辑器显示开关。
*
* 对应后台「扩展&增强 → 系统工具」设置(ExtensionRuntime::get_system_tools_settings()),
* 行为对齐参考主题 zib-theme.php / zib-head.php / admin-main.php / admin-set.php 的系统工具套件。
* 行为对齐参考实现的系统工具套件。
*
* @package Jio
*/
+1 -1
View File
@@ -68,7 +68,7 @@ class InlineStyleBuilder {
}
echo '}</style>' . "\n";
// 对齐参考主题 zib_head_css():主题色变量与 --main-radius 挂在 body(main.css 的定义层级),
// 主题色变量与 --main-radius 挂在 body(main.css 的定义层级),
// 夜间主题色仅在单独设置时覆盖 body.dark-theme。
// main.css declares these defaults on body; :root values cannot override them by inheritance.
echo '<style id="jio-theme-color">body{' . $this->theme_color_vars($primary_color)
+8 -8
View File
@@ -2,8 +2,8 @@
/**
* 前端页面编辑(后台「扩展&增强 → 系统工具」的 admin_frontend_set)。
*
* 对齐参考主题 zib-frontend-set.php:wp_footer 直出 #modal_admin_set 弹窗
* (bootstrap modal + wp-ajax-submit 走 vendored main.js 的 jio_ajax 契约),
* wp_footer 直出 #modal_admin_set 弹窗
* (bootstrap modal + wp-ajax-submit 走 main.js 的 jio_ajax 契约),
* 管理员在前台快速修改当前文章/页面的参数或分类术语的名称与描述。
*
* @package Jio
@@ -73,9 +73,9 @@ class PageAdminSet {
}
/**
* 悬浮按钮:追加到右侧悬浮按钮栏(对齐参考主题 zib_admin_frontend_set_botton)。
* 悬浮按钮:追加到右侧悬浮按钮栏。
*
* 参考主题对移动端与桌面端共用同一按钮,$is_mobile 仅用于保持 filter 签名。
* 移动端与桌面端共用同一按钮,$is_mobile 仅用于保持 filter 签名。
*/
public function float_button($buttons, $is_mobile = null) {
if (!self::enabled()) {
@@ -90,7 +90,7 @@ class PageAdminSet {
return (string) $buttons . $button;
}
/** wp_footer 输出 #modal_admin_set(对齐参考主题 zib_frontend_set_modal)。 */
/** wp_footer 输出 #modal_admin_set。 */
public function render_modal(): void {
if (!self::enabled()) {
return;
@@ -111,7 +111,7 @@ class PageAdminSet {
$type_label = (string) get_post_type_object($post_type)->labels->singular_name;
}
// 对齐参考主题 zib_get_customize_widgets_url:跳转定制器小工具面板并返回当前页。
// 跳转定制器小工具面板并返回当前页。
$current_url = (string) home_url(add_query_arg(null, null));
$widgets_url = add_query_arg([
'url' => rawurlencode($current_url),
@@ -288,7 +288,7 @@ class PageAdminSet {
}
}
/** 文章/页面的弹窗字段(对齐参考主题 zib_get_frontend_set_input)。 */
/** 文章/页面的弹窗字段。 */
private function post_inputs(int $post_id): string {
$meta = class_exists('\Jio\Core\PostMetaBox')
? \Jio\Core\PostMetaBox::get_meta($post_id)
@@ -452,7 +452,7 @@ class PageAdminSet {
]);
}
/** 表单控件构建(对齐参考主题 zib_edit_input_construct)。 */
/** 表单控件构建。 */
private function render_inputs(array $inputs): string {
$output = '';
foreach ($inputs as $meta) {
+1 -1
View File
@@ -31,7 +31,7 @@ final class IconCatalog {
['id' => 'fas', 'title' => __('FA 实色', 'jio'), 'type' => 'fa', 'icons' => array_values((array) ($fa['fas'] ?? []))],
['id' => 'far', 'title' => __('FA 常规', 'jio'), 'type' => 'fa', 'icons' => array_values((array) ($fa['far'] ?? []))],
['id' => 'fab', 'title' => __('FA 品牌', 'jio'), 'type' => 'fa', 'icons' => array_values((array) ($fa['fab'] ?? []))],
['id' => 'zibsvg', 'title' => __('内置 SVG', 'jio'), 'type' => 'svg', 'icons' => self::sprite_keys()],
['id' => 'jiosvg', 'title' => __('内置 SVG', 'jio'), 'type' => 'svg', 'icons' => self::sprite_keys()],
['id' => 'custom', 'title' => __('自定义', 'jio'), 'type' => 'custom', 'icons' => []],
];
}
+1 -1
View File
@@ -222,7 +222,7 @@ class ChargeCard {
}
/**
* 批量自动生成卡密(参考主题 zibpay_generate_pass_card 同款行为)。
* 批量自动生成卡密。
*
* 每张卡同时生成随机卡号与随机密码;$meta 由 normalize_meta 校验,
* 与「卡密管理」页面的自动生成表单一一对应。
+8 -15
View File
@@ -46,25 +46,18 @@ class FloatButtons {
}
/**
* 「更多按钮」出厂默认项(对齐参考主题 float_btn.more 默认值)。
* 「更多按钮」出厂默认项。
*
* 不预设任何第三方指向:悬浮按钮是站点自身的界面,出厂值只给一个图标按钮,
* 链接与悬浮面板由站点自行配置。
*/
public static function gift_more_button(): array {
$img = get_template_directory_uri() . '/assets/img/logo.png';
return [
'desc' => '本站同款主题模板',
'icon' => 'zibsvg-gift-color',
'desc' => '',
'icon' => 'jiosvg-gift-color',
'link' => ['url' => '', 'target' => ''],
'hover' => '<a href="https://www.zibll.com/" target="_blank">
<div class="flex c-red">
<img class="flex0" alt="zibll子比主题" src="' . esc_url($img) . '" height="30">
<div class="flex1 ml10">
<dt>本站同款主题模板</dt>
<div class="px12 mt10 muted-color">zibll子比主题是一款漂亮优雅的网站主题模板,功能强大,配置简单。</div>
<div class="but mt10 p2-10 c-blue btn-block px12">查看详情</div>
</div>
</div>
</a>',
'hover_width' => 240,
'hover' => '',
'hover_width' => 200,
'pc_s' => true,
'm_s' => true,
'color' => ['color' => '', 'bg' => 'rgba(255, 111, 6, 0.2)'],
+1 -1
View File
@@ -673,7 +673,7 @@ class PaymentRuntime {
}
/**
* 标签颜色可选值(参考主题 zib_palette(array(), array('b','jb')))。
* 标签颜色可选值(b / jb 前缀两类)。
*
* @return array<int,string>
*/
+1 -1
View File
@@ -111,7 +111,7 @@ class PostDisplay {
}
/**
* 归档页高级筛选配置(参考主题 zib-category.php:zib_get_ajax_option_menu 语义)。
* 归档页高级筛选配置。
*
* cat 页优先匹配 cat_custom_filter(绑定 cats 含当前 term 时全量覆盖筛选项目);
* 未匹配或 tag 页回退默认配置:custom_filter_show 决定是否显示自定义筛选('all')。
+1 -1
View File
@@ -388,7 +388,7 @@ class ThemeSearch {
return '';
}
/** 全局主题色:theme_skin_custom 优先,清空时使用 theme_skin 预置色(对齐参考主题 zib_head_css)。 */
/** 全局主题色:theme_skin_custom 优先,清空时使用 theme_skin 预置色。 */
public static function theme_color(): string {
$custom = \Jio\Core\Color::sanitize(Settings::get_value('theme_skin_custom', ''));
if ($custom !== '') {
+1 -1
View File
@@ -8,7 +8,7 @@ namespace Jio\Sms;
defined('ABSPATH') || exit;
/**
* ZibLL-style SMS dispatcher and send-rate limiting.
* SMS dispatcher and send-rate limiting.
*/
class SMS {
+3 -3
View File
@@ -75,7 +75,7 @@ class BanAppeal {
}
// 禁封状态门禁:封号(ban)与小黑屋(suspend)均可申诉
// (对齐参考主题 zib_user_is_ban 的 1/2 双类型语义)。
// (两种治理状态都允许发起申诉)。
$restricted = class_exists('\Jio\User\Restriction')
&& in_array(
\Jio\User\Restriction::get_instance()->get_display_state($user_id),
@@ -85,7 +85,7 @@ class BanAppeal {
if (!$restricted) {
wp_send_json(['error' => 1, 'msg' => __('当前账号未处于禁封状态', 'jio')]);
}
// 禁封时勾选“禁止用户申诉”的门禁(参考主题 no_appeal 同语义)。
// 禁封时勾选“禁止用户申诉”的门禁。
$no_appeal = get_user_meta($user_id, '_jio_no_appeal', true);
if (is_array($no_appeal) && $no_appeal['desc'] !== '') {
wp_send_json(['error' => 1, 'msg' => sprintf(__('当前账号已被限制申诉:%s', 'jio'), (string) $no_appeal['desc'])]);
@@ -98,7 +98,7 @@ class BanAppeal {
$reason = isset($_POST['reason']) ? sanitize_textarea_field(wp_unslash((string) $_POST['reason'])) : '';
$data_rows = null;
// 申诉弹窗表单(1:1 参考主题 zib_get_user_ban_appeal_modal):资料项以
// 申诉弹窗表单:资料项以
// data[<key>] 逐项提交,申诉说明取 data['申诉说明'];旧版平铺字段保持兼容。
if (isset($_POST['data']) && is_array($_POST['data'])) {
$clean = [];
+6 -8
View File
@@ -38,9 +38,9 @@ class Restriction {
}
public function init(): void {
// 禁封用户前台拦截(对齐参考主题 zib_user_ban_restrict_login:
// 禁封用户前台拦截:
// 封号用户可正常登录,但前台任何页面均展示禁封状态页;禁封中
// 不得拦截登录本身——登录后的落地页即禁封页)。
// 不得拦截登录本身——登录后的落地页即禁封页。
add_action('template_redirect', [$this, 'restrict_frontend_access'], 1);
// Enforce comment mute
add_filter('pre_comment_on_post', [$this, 'enforce_comment_mute']);
@@ -219,8 +219,7 @@ class Restriction {
* 封号(ban) → c-red 违规已封号(最严重:无法登录);
* 小黑屋(suspend) → c-yellow 小黑屋禁封中(部分限制);
* 禁言(mute) → c-gray 禁言中(评论域限制)。
* 对齐参考主题 zib_ban_author_header_identity_filter 的红/默认双色语义,
* 禁言为 Jio 扩展状态。
* 红/黄/灰三色徽章语义,禁言为 Jio 扩展状态。
*
* @return array<string,array{label:string,tone:string,icon:string}> 展示态 => 徽章字段
*/
@@ -234,7 +233,7 @@ class Restriction {
/**
* 生效禁封信息行(查看禁封状态弹窗 / 申诉弹窗 / 登录后禁封页 / 管理端
* 禁封解封弹窗共用;对齐参考主题 zib_get_ban_info_modal 的字段集)。
* 禁封解封弹窗共用的字段集)。
*
* @return array<string,mixed>|array{} 空数组表示无生效禁封/小黑屋。
*/
@@ -276,7 +275,7 @@ class Restriction {
/**
* Check if a user is in 小黑屋 (active global suspend).
*
* 对齐参考主题语义:小黑屋用户失去所有发布权限(发帖、评论等)及大部分操作权限。
* 小黑屋用户失去所有发布权限(发帖、评论等)及大部分操作权限。
*/
public function is_suspended(int $user_id): bool {
return $this->is_restricted($user_id, self::TYPE_SUSPEND, self::SCOPE_GLOBAL);
@@ -309,8 +308,7 @@ class Restriction {
}
/**
* 前台禁封拦截页(1:1 复刻参考主题 zib_user_ban_restrict_login /
* zib_die_page):封号(ban)用户登录后访问任何前台页面,均展示禁封状态页
* 前台禁封拦截页:封号(ban)用户登录后访问任何前台页面,均展示禁封状态页
* (红盒提示 + 禁封信息行 + 申诉权限 + 退出登录/申诉按钮)。
* 小黑屋/禁言为部分限制,可正常浏览站点,不走此拦截。
*/
+1 -1
View File
@@ -112,7 +112,7 @@ final class FieldSchema {
/**
* Inline rich-HTML sanitizer for admin-authored card title/desc fields.
* `badge` and friends are not in WP's $allowedposttags, so wp_kses_post()
* would strip the exact markup legacy/Zibll renders verbatim.
* would strip the exact markup these fields render verbatim.
*/
private static function rich_inline_html(string $value): string {
return function_exists('jio_icon_card_kses')
+1 -1
View File
@@ -91,7 +91,7 @@ final class FrontendRenderer {
}
private static function render_reference_widget(WidgetDefinition $definition, array $instance, SchemaWidget $widget, string $content): void {
$classes = ['zib-widget-wrap', 'jio-' . str_replace('_', '-', $definition->slug()) . '-wrap'];
$classes = ['jio-widget-box-wrap', 'jio-' . str_replace('_', '-', $definition->slug()) . '-wrap'];
if (in_array($definition->slug(), ['user_card', 'author_card'], true)) {
$classes[] = 'jio-user-widget-wrap';
}
+3 -4
View File
@@ -29,13 +29,13 @@ final class PostQuery {
$args['paged'] = 1;
}
// The modern post widgets use Zibll's signed `cat` syntax. Legacy
// The modern post widgets use the signed `cat` syntax. Legacy
// category_ids remains available only to the unrelated generic posts
// widgets; a tab segment must never fall back to it.
$is_reference_segment = array_key_exists('cat', $segment);
if (array_key_exists('cat', $config)) {
// WP_Query's `cat` expands included parents to descendants and
// applies negative IDs with the same reference-theme semantics.
// applies negative IDs as exclusions.
$categories = self::signed_ids((string) $config['cat']);
if ($categories) {
$args['cat'] = implode(',', $categories);
@@ -64,8 +64,7 @@ final class PostQuery {
]];
}
self::apply_order($args, (string) ($config['orderby'] ?? 'date'), (string) ($config['order'] ?? 'DESC'));
$pay = array_key_exists('zibpay_type', $config) ? $config['zibpay_type'] : ($config['pay_type'] ?? '');
self::apply_pay_type($args, $pay);
self::apply_pay_type($args, $config['pay_type'] ?? '');
return $args;
}
+1 -1
View File
@@ -63,7 +63,7 @@ final class PostRenderer {
return jio_render_mini_list($query, array_merge($config, ['class' => 'ajax-item']), false);
}
if ($mode === 'list') {
// Zibll suppresses archive-only thumb variants in widget list mode.
// Widget list mode suppresses archive-only thumb variants.
$config['is_mult_thumb'] = 'disable';
$config['is_no_thumb'] = 'disable';
}
@@ -35,7 +35,7 @@ final class ContentRenderer {
}
$inner = self::ajaxpager($instance, $slug, $widget_id, 1, '');
$html = '<div class="widget-main-post mb20 style-' . esc_attr($style) . '">';
$html .= $style === 'mini' ? '<div class="zib-widget posts-mini-lists">' : '';
$html .= $style === 'mini' ? '<div class="jio-widget-box posts-mini-lists">' : '';
$html .= $inner;
$html .= $style === 'mini' ? '</div>' : '';
return $html . '</div>';
@@ -102,7 +102,7 @@ final class ContentRenderer {
$visible_index++;
}
if ($buttons === '') return '';
return '<div class="widget-tab-post style-' . esc_attr($style) . ($style === 'mini' ? ' posts-mini-lists zib-widget' : ' index-tab relative-h') . '" data-widget="tab_posts" data-instance="' . esc_attr($widget_id) . '"><div class="relative' . ($style === 'card' ? ' mb20' : '') . '"><ul class="list-inline scroll-x no-scrollbar' . ($style === 'mini' ? ' tab-nav-theme' : '') . '" role="tablist">' . $buttons . '</ul></div><div class="tab-content">' . $panels . '</div></div>';
return '<div class="widget-tab-post style-' . esc_attr($style) . ($style === 'mini' ? ' posts-mini-lists jio-widget-box' : ' index-tab relative-h') . '" data-widget="tab_posts" data-instance="' . esc_attr($widget_id) . '"><div class="relative' . ($style === 'card' ? ' mb20' : '') . '"><ul class="list-inline scroll-x no-scrollbar' . ($style === 'mini' ? ' tab-nav-theme' : '') . '" role="tablist">' . $buttons . '</ul></div><div class="tab-content">' . $panels . '</div></div>';
}
private static function term_cards(array $instance): string {
+34 -34
View File
@@ -60,7 +60,7 @@ final class GeneralRenderer {
continue;
}
$icon_size = !$cover && !empty($instance['size']) ? 16 + (int) $instance['size'] : ($cover ? 25 : 0);
$class = $cover ? (!empty($instance['show_widget_bg']) ? 'padding-10' : 'zib-widget mb10') : (!empty($instance['show_widget_bg']) ? 'box-body nopw-sm' : 'mb20');
$class = $cover ? (!empty($instance['show_widget_bg']) ? 'padding-10' : 'jio-widget-box mb10') : (!empty($instance['show_widget_bg']) ? 'box-body nopw-sm' : 'mb20');
$args = [
'icon' => $card['icon'] ?? '',
'customize_icon' => $card['customize_icon'] ?? '',
@@ -86,8 +86,8 @@ final class GeneralRenderer {
}
if ($items === '') return '';
$inner = $is_row ? '<div class="row gutters-5">' . $items . '</div>' : $items;
if ($cover) return '<div class="' . ($instance['show_widget_bg'] ?? false ? 'zib-widget padding-10' : 'mb10') . '">' . $inner . '</div>';
return '<div class="clearfix">' . (!empty($instance['show_widget_bg']) ? '<div class="zib-widget nobottom notop">' : '') . $inner . (!empty($instance['show_widget_bg']) ? '</div>' : '') . '</div>';
if ($cover) return '<div class="' . ($instance['show_widget_bg'] ?? false ? 'jio-widget-box padding-10' : 'mb10') . '">' . $inner . '</div>';
return '<div class="clearfix">' . (!empty($instance['show_widget_bg']) ? '<div class="jio-widget-box nobottom notop">' : '') . $inner . (!empty($instance['show_widget_bg']) ? '</div>' : '') . '</div>';
}
private static function render_video(array $i): string {
@@ -225,18 +225,18 @@ final class GeneralRenderer {
$rows_data = array_values(array_filter($rows_data, static fn(array $row): bool => $row !== []));
$style_vars = [
'--zps-card-w:' . (int) $i['card_width'] . 'px',
'--zps-card-h:' . (int) $i['card_height'] . 'px',
'--zps-card-radius:' . (int) $i['card_radius'] . 'px',
'--zps-speed:' . max(0.1, (float) $i['speed']),
'--jps-card-w:' . (int) $i['card_width'] . 'px',
'--jps-card-h:' . (int) $i['card_height'] . 'px',
'--jps-card-radius:' . (int) $i['card_radius'] . 'px',
'--jps-speed:' . max(0.1, (float) $i['speed']),
];
$style_attr = ' style="' . esc_attr(implode(';', $style_vars)) . '"';
$wrap_class = 'zib-partners-scroll';
$wrap_class .= ' zps-style-' . sanitize_html_class((string) $i['style_type']);
$wrap_class .= !empty($i['pause_hover']) ? ' zps-pause-hover' : '';
$wrap_class .= !empty($i['card_bg']) ? ' zps-card-bg' : '';
$wrap_class .= !empty($i['end_fade']) ? ' zps-end-fade' : '';
$wrap_class = 'jio-partners-scroll';
$wrap_class .= ' jps-style-' . sanitize_html_class((string) $i['style_type']);
$wrap_class .= !empty($i['pause_hover']) ? ' jps-pause-hover' : '';
$wrap_class .= !empty($i['card_bg']) ? ' jps-card-bg' : '';
$wrap_class .= !empty($i['end_fade']) ? ' jps-end-fade' : '';
$html = '';
foreach ($rows_data as $row_index => $row_partners) {
@@ -246,7 +246,7 @@ final class GeneralRenderer {
} else {
$dir = $row_index % 2 === 0 ? 'left' : 'right';
}
$html .= '<div class="zps-row zps-dir-' . $dir . '" data-zps-row><div class="zps-track" data-zps-track><div class="zps-group flex shrink0">';
$html .= '<div class="jps-row jps-dir-' . $dir . '" data-jps-row><div class="jps-track" data-jps-track><div class="jps-group flex shrink0">';
foreach ($row_partners as $partner) {
$html .= self::partners_card($partner, (string) $i['style_type'], !empty($i['go_link']));
}
@@ -255,7 +255,7 @@ final class GeneralRenderer {
if (trim($html) === '') {
return '';
}
return '<div class="' . (!empty($i['show_widget_bg']) ? 'zib-widget' : 'mb20') . '"><div class="' . esc_attr($wrap_class) . '"' . $style_attr . '>' . $html . '</div></div>';
return '<div class="' . (!empty($i['show_widget_bg']) ? 'jio-widget-box' : 'mb20') . '"><div class="' . esc_attr($wrap_class) . '"' . $style_attr . '>' . $html . '</div></div>';
}
private static function partners_card(array $partner, string $style_type, bool $go_link): string {
@@ -266,7 +266,7 @@ final class GeneralRenderer {
if ($image === '' && $title === '') {
return '';
}
$img_tag = $image !== '' ? '<img class="zps-img" src="' . $image . '" alt="' . esc_attr($title !== '' ? $title : __('合作伙伴', 'jio')) . '">' : '';
$img_tag = $image !== '' ? '<img class="jps-img" src="' . $image . '" alt="' . esc_attr($title !== '' ? $title : __('合作伙伴', 'jio')) . '">' : '';
$inner = '';
if ($style_type === 'logo') {
@@ -276,19 +276,19 @@ final class GeneralRenderer {
$inner .= $img_tag;
} elseif ($style_type === 'chip') {
if ($img_tag !== '') {
$inner .= '<span class="zps-chip-icon flex jc shrink0 mr6">' . $img_tag . '</span>';
$inner .= '<span class="jps-chip-icon flex jc shrink0 mr6">' . $img_tag . '</span>';
}
$inner .= '<span class="zps-chip-title text-ellipsis">' . esc_html($title) . '</span>';
$inner .= '<span class="jps-chip-title text-ellipsis">' . esc_html($title) . '</span>';
} else {
if ($img_tag !== '') {
$inner .= '<div class="zps-card-icon flex jc shrink0 mr10">' . $img_tag . '</div>';
$inner .= '<div class="jps-card-icon flex jc shrink0 mr10">' . $img_tag . '</div>';
}
$inner .= '<div class="zps-card-text flex xx flex1">';
$inner .= '<div class="jps-card-text flex xx flex1">';
if ($title !== '') {
$inner .= '<div class="zps-card-title text-ellipsis font-bold">' . esc_html($title) . '</div>';
$inner .= '<div class="jps-card-title text-ellipsis font-bold">' . esc_html($title) . '</div>';
}
if ($desc !== '') {
$inner .= '<div class="zps-card-desc text-ellipsis muted-color em09 mt3">' . esc_html($desc) . '</div>';
$inner .= '<div class="jps-card-desc text-ellipsis muted-color em09 mt3">' . esc_html($desc) . '</div>';
}
$inner .= '</div>';
}
@@ -299,7 +299,7 @@ final class GeneralRenderer {
$url = esc_url(jio_go_link($link['url'], true));
}
$target = $link['target'] === '_blank' ? ' target="_blank" rel="noopener noreferrer"' : '';
$base_class = 'zps-item flex ac shrink0';
$base_class = 'jps-item flex ac shrink0';
if ($url !== 'javascript:void(0)') {
return '<a class="' . $base_class . '" href="' . $url . '"' . $target . '>' . $inner . '</a>';
}
@@ -317,9 +317,9 @@ final class GeneralRenderer {
$m_row = max(1, (int) $i['m_row']);
$col_class = 'col-sm-' . max(1, (int) (12 / $pc_row)) . ' col-xs-' . max(1, (int) (12 / $m_row));
$style_vars = '--zci-radius:' . (int) $i['card_radius'] . 'px;--zci-band-h:' . (int) $i['top_band_height'] . 'px;';
$wrap_class = 'zib-combo-info-card row gutters-' . (int) ($is_mobile ? $i['m_gap'] : $i['pc_gap']);
$wrap_class .= !empty($i['top_band']) ? ' zci-has-band' : '';
$style_vars = '--jci-radius:' . (int) $i['card_radius'] . 'px;--jci-band-h:' . (int) $i['top_band_height'] . 'px;';
$wrap_class = 'jio-combo-info-card row gutters-' . (int) ($is_mobile ? $i['m_gap'] : $i['pc_gap']);
$wrap_class .= !empty($i['top_band']) ? ' jci-has-band' : '';
$default_cta = (string) ($i['cta_text'] !== '' ? $i['cta_text'] : __('立即体验', 'jio'));
$default_cta_color = (string) ($i['cta_color'] ?? '');
@@ -374,15 +374,15 @@ final class GeneralRenderer {
$icon_html = '';
$icon_image = esc_url((string) $card['icon_image']);
if ($icon_image !== '') {
$icon_html = '<div class="zci-icon flex jc shrink0 mb20"><img src="' . $icon_image . '" alt="' . esc_attr($title !== '' ? $title : __('图标', 'jio')) . '"></div>';
$icon_html = '<div class="jci-icon flex jc shrink0 mb20"><img src="' . $icon_image . '" alt="' . esc_attr($title !== '' ? $title : __('图标', 'jio')) . '"></div>';
} elseif (!empty($card['icon'])) {
$icon_html = '<div class="zci-icon flex jc shrink0 mb20">' . self::icon_markup((string) $card['icon']) . '</div>';
$icon_html = '<div class="jci-icon flex jc shrink0 mb20">' . self::icon_markup((string) $card['icon']) . '</div>';
}
$tags_html = '';
$tags = (array) ($card['tags'] ?? []);
if ($tags) {
$tags_html .= '<div class="zci-tags mb10 text-ellipsis">';
$tags_html .= '<div class="jci-tags mb10 text-ellipsis">';
foreach ($tags as $tag) {
if (!is_array($tag)) {
continue;
@@ -396,7 +396,7 @@ final class GeneralRenderer {
$tags_html .= '</div>';
}
$desc_html = $desc !== '' ? '<div class="zci-desc text-ellipsis-3 muted-color">' . wp_kses_post($desc) . '</div>' : '';
$desc_html = $desc !== '' ? '<div class="jci-desc text-ellipsis-3 muted-color">' . wp_kses_post($desc) . '</div>' : '';
$cta_text = trim((string) ($card['cta_text'] ?? '')) !== '' ? trim((string) $card['cta_text']) : $default_cta;
$cta_color = trim((string) ($card['cta_color'] ?? '')) !== '' ? trim((string) $card['cta_color']) : $default_cta_color;
@@ -407,15 +407,15 @@ final class GeneralRenderer {
}
$target = $link['target'] === '_blank' ? ' target="_blank" rel="noopener noreferrer"' : '';
$cta_html = $cta_text !== '' && $url !== ''
? '<a class="zci-cta inflex ac gap6 ' . esc_attr(sanitize_html_class($cta_color)) . '" href="' . $url . '"' . $target . '><span>' . esc_html($cta_text) . '</span><i class="fa fas fa-arrow-right zci-arrow" aria-hidden="true"></i></a>'
? '<a class="jci-cta inflex ac gap6 ' . esc_attr(sanitize_html_class($cta_color)) . '" href="' . $url . '"' . $target . '><span>' . esc_html($cta_text) . '</span><i class="fa fas fa-arrow-right jci-arrow" aria-hidden="true"></i></a>'
: '';
$inner = '<div class="zci-body flex xx flex1">' . $icon_html;
$inner = '<div class="jci-body flex xx flex1">' . $icon_html;
if ($title !== '') {
$inner .= '<div class="zci-title font-bold text-ellipsis mb10">' . esc_html($title) . '</div>';
$inner .= '<div class="jci-title font-bold text-ellipsis mb10">' . esc_html($title) . '</div>';
}
$inner .= $tags_html . $desc_html . $cta_html . '</div>';
return '<div class="zci-card flex xx zci-band-' . esc_attr(sanitize_html_class($band)) . '">' . $inner . '</div>';
return '<div class="jci-card flex xx jci-band-' . esc_attr(sanitize_html_class($band)) . '">' . $inner . '</div>';
}
private static function render_text_title(array $i): string {
@@ -486,7 +486,7 @@ final class GeneralRenderer {
if ($list === '') {
return RendererHelpers::empty_state(__('暂无评论', 'jio'));
}
return '<div class="box-body comment-mini-lists zib-widget">' . $list . '</div>';
return '<div class="box-body comment-mini-lists jio-widget-box">' . $list . '</div>';
}
private static function render_links(array $i): string {
@@ -6,7 +6,7 @@ use Jio\WidgetSystem\RendererHelpers;
defined('ABSPATH') || exit;
/** Reference-compatible renderer for the modern Zibll slider widgets. */
/** Renderer for the slider widgets. */
final class SliderRenderer {
public static function render(string $slug, array $instance, array $context = []): string {
unset($context);
@@ -88,9 +88,9 @@ final class SliderRenderer {
$html = '<div class="' . esc_attr($class) . '"' . $attrs . '><div class="swiper-wrapper">' . $items . '</div>';
if (!empty($option['button']) && $count > 1) $html .= '<div class="swiper-button-prev"></div><div class="swiper-button-next"></div>';
if (!empty($option['pagination']) && $count > 1) $html .= '<div class="swiper-pagination kaoyou"></div>';
// 参考 zib_new_slider:先闭合 .new-swiper,再由外层闭合 .zib-slider。
// 先闭合 .new-swiper,再由外层闭合 .jio-slider-box。
$html .= '</div>';
return '<div class="relative zib-slider">' . $html . '</div>';
return '<div class="relative jio-slider-box">' . $html . '</div>';
}
private static function combo(array $instance): string {
+5 -5
View File
@@ -74,7 +74,7 @@ final class UserRenderer {
}
/**
* 未登录卡片(legacy zib_get_user_singin_page_box parity)。
* 未登录卡片。
*/
private static function guest_card(array $i): string {
$title = trim((string) ($i['loged_title'] ?? ''));
@@ -95,7 +95,7 @@ final class UserRenderer {
$buttons .= '<a href="javascript:;" class="signup-loader ml10 but jb-yellow padding-lg">' . jio_renderer_svg_icon('signup') . esc_html__('注册', 'jio') . '</a>';
}
return '<div class="mb20"><div class="user-card zib-widget widget">' . $cover
return '<div class="mb20"><div class="user-card jio-widget-box widget">' . $cover
. '<div class="card-content mt10">'
. '<div class="user-content">'
. '<div class="user-avatar">' . $avatar . '</div>'
@@ -139,7 +139,7 @@ final class UserRenderer {
}
/**
* 登录卡片(legacy zib_get_user_card_box parity)。
* 登录卡片。
*
* @param int $user_id 卡片用户。
* @param array $args show_posts/show_checkin/show_img_bg/show_button/button_1,2 与文章模块参数。
@@ -208,7 +208,7 @@ final class UserRenderer {
$cover = !empty($args['show_img_bg']) ? self::cover($user_id, 'lazy_cover') : '';
return '<div class="user-card zib-widget widget">' . $cover
return '<div class="user-card jio-widget-box widget">' . $cover
. '<div class="card-content mt10 relative">'
. '<div class="user-content">' . $checkin
. '<div class="user-avatar">' . $avatar . '</div>'
@@ -223,7 +223,7 @@ final class UserRenderer {
}
/**
* 卡片按钮1(legacy zib_get_new_add_btns 的单按钮 parity:正则剥掉 icon/text,输出纯文字药丸)。
* 卡片按钮1(单按钮:正则剥掉 icon/text,输出纯文字药丸)。
*/
private static function new_add_btn(string $type, string $class, string $text): string {
if ($type !== 'post') {
+11 -14
View File
@@ -89,19 +89,16 @@ final class WidgetSchemas {
['id' => 'blank', 'type' => 'switcher', 'label' => '链接新窗口打开', 'default' => false],
['id' => 'radius', 'type' => 'switcher', 'label' => '两边显示为圆形', 'default' => false],
['id' => 'interval', 'type' => 'spinner', 'label' => '滚动间隔', 'default' => 3, 'min' => 1, 'max' => 10, 'step' => 1, 'unit' => '秒'],
['id' => 'color', 'type' => 'palette', 'label' => '颜色', 'default' => 'c-blue', 'options' => self::zib_palette()],
['id' => 'color', 'type' => 'palette', 'label' => '颜色', 'default' => 'c-blue', 'options' => self::palette()],
['id' => 'source', 'type' => 'radio', 'label' => '内容来源', 'default' => '', 'options' => ['' => '自定义', 'posts' => '文章']],
['id' => 'msg_icon', 'type' => 'icon', 'label' => '消息图标', 'default' => 'zibsvg-hot', 'dependency' => ['source', '!=', '']],
['id' => 'msg_icon', 'type' => 'icon', 'label' => '消息图标', 'default' => 'jiosvg-hot', 'dependency' => ['source', '!=', '']],
['id' => 'count', 'type' => 'spinner', 'label' => '获取文章数量', 'default' => 8, 'min' => 1, 'max' => 50, 'dependency' => ['source', '!=', '']],
['id' => 'desc_s', 'type' => 'switcher', 'label' => '显示简介(关闭则只显示标题)', 'default' => false],
['id' => 'posts_opts', 'type' => 'fieldset', 'label' => '文章筛选', 'default' => [], 'dependency' => ['source', '==', 'posts'], 'fields' => self::notice_post_fields()],
[
'id' => 'img_ids', 'type' => 'group', 'label' => '消息列表', 'max_items' => 50,
'dependency' => ['source', '==', ''],
'default' => [
['title' => '子比主题,更优雅的Wordpress主题', 'icon' => 'zibsvg-hot', 'href' => 'https://zibll.com'],
['title' => '更优雅的WordPress网站主题:子比主题!全面开启', 'icon' => 'zibsvg-hot', 'href' => 'https://zibll.com'],
],
'default' => [],
'fields' => [
['id' => 'title', 'type' => 'text', 'label' => '消息内容', 'default' => '', 'allow_html' => true],
['id' => 'icon', 'type' => 'icon', 'label' => '图标', 'default' => 'fa-home'],
@@ -241,7 +238,7 @@ final class WidgetSchemas {
return [
['id' => 'load_mode', 'type' => 'radio', 'label' => '模块加载方式', 'default' => 'ajax', 'options' => ['detail' => '直接加载', 'ajax' => 'ajax懒加载'], 'description' => 'ajax懒加载:当页面加载完后,根据用户需要在加载当前模块内容,可提高页面渲染效率'],
['id' => 'cat', 'type' => 'text', 'label' => '分类限制', 'default' => '', 'sanitize' => 'reference_ids', 'description' => '限制请填写对应的ID,多个ID请用英文逗号隔开。如:1,2,3。支持负数进行排除,例如:-1,-2,-3。'],
['id' => 'zibpay_type', 'type' => 'checkbox', 'label' => '商品类型筛选', 'default' => [], 'options' => self::pay_types(), 'description' => '不做其它筛选'],
['id' => 'pay_type', 'type' => 'checkbox', 'label' => '商品类型筛选', 'default' => [], 'options' => self::pay_types(), 'description' => '不做其它筛选'],
['id' => 'limit_day', 'type' => 'spinner', 'label' => '发布时间限制', 'default' => 0, 'min' => 0, 'step' => 5, 'unit' => '天', 'description' => '仅显示最近多少天发布的文章,为0则不限制'],
['id' => 'orderby', 'type' => 'select', 'label' => '排序方式', 'default' => '', 'options' => self::posts_orderby()],
['id' => 'order', 'type' => 'radio', 'label' => '顺序', 'default' => 'desc', 'options' => ['desc' => '降序', 'asc' => '升序']],
@@ -268,7 +265,7 @@ final class WidgetSchemas {
'fields' => [
['id' => 'title', 'type' => 'textarea', 'label' => '标题(必填)', 'default' => '', 'allow_html' => true, 'attributes' => ['rows' => 1], 'description' => '栏目显示的标题,支持HTML代码,注意代码规范'],
['id' => 'cat', 'type' => 'text', 'label' => '分类限制', 'default' => '', 'sanitize' => 'reference_ids'],
['id' => 'zibpay_type', 'type' => 'checkbox', 'label' => '商品类型筛选', 'default' => [], 'options' => self::pay_types(), 'description' => '不做其它筛选'],
['id' => 'pay_type', 'type' => 'checkbox', 'label' => '商品类型筛选', 'default' => [], 'options' => self::pay_types(), 'description' => '不做其它筛选'],
['id' => 'limit_day', 'type' => 'spinner', 'label' => '发布时间限制', 'default' => 0, 'min' => 0, 'step' => 5, 'unit' => '天', 'description' => '仅显示最近多少天发布的文章,为0则不限制'],
['id' => 'orderby', 'type' => 'select', 'label' => '排序方式', 'default' => '', 'options' => self::posts_orderby()],
['id' => 'order', 'type' => 'radio', 'label' => '顺序', 'default' => 'desc', 'options' => ['desc' => '降序', 'asc' => '升序']],
@@ -280,7 +277,7 @@ final class WidgetSchemas {
private static function oneline_posts_fields(): array {
return [
['id' => 'cat', 'type' => 'text', 'label' => '分类限制', 'default' => '', 'sanitize' => 'reference_ids', 'description' => '限制请填写对应的ID,多个ID请用英文逗号隔开。如:1,2,3。支持负数进行排除,例如:-1,-2,-3。'],
['id' => 'zibpay_type', 'type' => 'checkbox', 'label' => '商品类型筛选', 'default' => [], 'options' => self::pay_types(), 'description' => '不做其它筛选'],
['id' => 'pay_type', 'type' => 'checkbox', 'label' => '商品类型筛选', 'default' => [], 'options' => self::pay_types(), 'description' => '不做其它筛选'],
['id' => 'orderby', 'type' => 'select', 'label' => '排序方式', 'default' => '', 'options' => self::posts_orderby()],
['id' => 'order', 'type' => 'radio', 'label' => '顺序', 'default' => 'desc', 'options' => ['desc' => '降序', 'asc' => '升序']],
['id' => 'style', 'type' => 'radio', 'label' => '列表样式', 'default' => 'card', 'options' => ['list' => '列表样式', 'card' => '卡片样式', 'mini' => 'mini列表'], 'description' => '<div class="c-yellow">注意:不同样式尺寸不同,请根据放置的位置合理选择。例如:放在宽度较小的侧边栏,则需选择mini样式,否则显示效果不佳</div>'],
@@ -496,10 +493,10 @@ final class WidgetSchemas {
$button_fields = [
['id' => 'show_button', 'type' => 'switcher', 'label' => '显示按钮', 'description' => $slug === 'user_card' ? '登录后才会显示' : '当登录用户就是文章作者的时候才会显示', 'default' => true],
['id' => 'button_1', 'type' => 'radio', 'label' => '按钮1类型', 'default' => 'post', 'options' => ['post' => '文章投稿'], 'dependency' => ['show_button', '!=', '']],
['id' => 'button_1_class', 'type' => 'palette', 'label' => '按钮1颜色', 'default' => 'jb-pink', 'options' => self::zib_palette(), 'dependency' => ['show_button', '!=', '']],
['id' => 'button_1_class', 'type' => 'palette', 'label' => '按钮1颜色', 'default' => 'jb-pink', 'options' => self::palette(), 'dependency' => ['show_button', '!=', '']],
['id' => 'button_1_text', 'type' => 'text', 'label' => '按钮1文字', 'default' => '发布文章', 'dependency' => ['show_button', '!=', '']],
['id' => 'button_2', 'type' => 'radio', 'label' => '按钮2类型', 'default' => 'center', 'options' => ['home' => '个人主页', 'center' => '用户中心'], 'dependency' => ['show_button', '!=', '']],
['id' => 'button_2_class', 'type' => 'palette', 'label' => '按钮2颜色', 'default' => 'jb-blue', 'options' => self::zib_palette(), 'dependency' => ['show_button', '!=', '']],
['id' => 'button_2_class', 'type' => 'palette', 'label' => '按钮2颜色', 'default' => 'jb-blue', 'options' => self::palette(), 'dependency' => ['show_button', '!=', '']],
['id' => 'button_2_text', 'type' => 'text', 'label' => '按钮2文字', 'default' => '用户中心', 'dependency' => ['show_button', '!=', '']],
];
if ($slug === 'user_card') {
@@ -597,7 +594,7 @@ final class WidgetSchemas {
}
private static function tag_palette(): array {
return ['' => '默认'] + self::zib_palette();
return ['' => '默认'] + self::palette();
}
private static function text_palette(): array {
@@ -620,10 +617,10 @@ final class WidgetSchemas {
}
private static function button_palette(): array {
return ['' => '默认'] + self::zib_palette();
return ['' => '默认'] + self::palette();
}
private static function zib_palette(): array {
private static function palette(): array {
return [
'c-red' => '红色', 'c-red-2' => '深红', 'c-yellow' => '黄色', 'c-yellow-2' => '深黄',
'c-cyan' => '青色', 'c-blue' => '蓝色', 'c-blue-2' => '深蓝', 'c-green' => '绿色',