Files
wordpress-theme-aksrt/inc/classes/admin/schema/class-aksrt-admin-schema-forum-other.php
T
kate522andClaude Fable 5 accf5bdbe8 字段全量比对收口:对齐 Zibll 默认值并后移等级/徽章入口
继续 Workstream C 全量字段比对,并按用户裁定处理冲突:
- UsersLevel / UsersBadge 采用“保留但后移”策略,不兼容旧数据接口,继续沿用当前新型
  sections/router 体系,在 users 主线中降权后移到 compat tools 分区。
- 按 Zibll 实际 options 默认值收敛一批高影响字段,打通 PHP schema + 前端 schema 两层:
  * global/search: search_posts / search_no_page / search_custom_key_s / search_cat -> true
  * forum: bbs_show_new_plate / bbs_post_pay_hide_type_s / bbs_post_pay_vip_price_s /
    bbs_reply_paginate_ias_s / bbs_comment_upload_img / bbs_rewrite_suffix_html_s -> true
  * shop: shop_s -> true, shop_breadcrumbs_shop_home -> false,
    shop_rewrite_suffix_html_s -> true
  * users: user_signup_no_repas / message_auto_clear_s / post_rewards_s /
    user_report_img_s -> true
  * post-list: cat_s -> false

验证:
- php -l 检查所有改动过的 PHP schema 文件均通过
- node --check 检查所有改动过的前端 schema 文件均通过
- shim 校验确认 users-level/users-badge 已从 users 主分区移出并以 secondaryEntry=true
  落入 compat tools,且全站无路由碰撞
- 注:本 worktree 下缺少可执行 vite,未能在隔离副本中复跑 npm build;此前主副本同批次
  IA 修正构建通过,本次继续只改 schema/sections 常量与默认值,已用语法校验覆盖

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 19:00:52 +08:00

47 lines
2.8 KiB
PHP

<?php
/**
* AKSRT_Admin_Schema_Forum_Other section schema.
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
class AKSRT_Admin_Schema_Forum_Other {
public static function build(): array {
return [
'key' => 'other',
'title' => '其它设置',
'version' => '1.0.0',
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'vote', 'title' => '投票', 'fields' => [
['key' => 'bbs_vote_number_type', 'label' => '投票显示', 'type' => 'select', 'default' => 'percent', 'options' => [
['label' => '百分比', 'value' => 'percent'],
['label' => '票数', 'value' => 'number'],
]],
['key' => 'bbs_vote_max', 'label' => '选项上限', 'type' => 'number', 'default' => 8, 'min' => 2, 'max' => 20],
]],
['key' => 'moderator_apply', 'title' => '版主申请', 'fields' => [
['key' => 'bbs_apply_moderator_desc', 'label' => '申请说明', 'type' => 'textarea', 'default' => '欢迎有热情的用户申请成为版主,协助管理社区秩序。'],
]],
['key' => 'misc', 'title' => '杂项', 'fields' => [
['key' => 'bbs_term_thumb', 'label' => '标签默认缩略图', 'type' => 'media', 'default' => ''],
['key' => 'bbs_post_lists_hide_pay_s', 'label' => '列表隐藏付费标记', 'type' => 'switch', 'default' => false],
['key' => 'bbs_post_title_strlen_limit', 'label' => '标题字数限制', 'type' => 'number', 'default' => 30, 'min' => 5, 'max' => 100, 'help' => '最小 5,最大 100'],
['key' => 'bbs_t_placeholder', 'label' => '标题占位符', 'type' => 'text', 'default' => '请输入标题'],
['key' => 'bbs_c_placeholder', 'label' => '内容占位符', 'type' => 'text', 'default' => '请输入内容'],
]],
['key' => 'url', 'title' => 'URL / 别名', 'fields' => [
['key' => 'bbs_rewrite_suffix_html_s', 'label' => '.html 后缀', 'type' => 'switch', 'default' => true],
['key' => 'bbs_plate_rewrite_slug', 'label' => '版块别名', 'type' => 'text', 'default' => 'board'],
['key' => 'bbs_posts_rewrite_slug', 'label' => '帖子别名', 'type' => 'text', 'default' => 'topic'],
['key' => 'bbs_posts_edit_rewrite_slug', 'label' => '编辑别名', 'type' => 'text', 'default' => 'topic-edit'],
['key' => 'bbs_posts_show_in_rest_s', 'label' => '古腾堡编辑器', 'type' => 'switch', 'default' => false, 'help' => '开启后帖子可使用 Gutenberg'],
]],
],
];
}
}