From 6c6c462df88cdbd1b9ee876cba77e3d11cfc9d02 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Aug 2026 14:52:19 +0800 Subject: [PATCH] refactor: remove forum and topic feature chains --- .gitignore | 3 + README.md | 2 - .../src/constants/sections/page-display.js | 10 - .../src/pages/content/HomepageSettings.vue | 4 +- .../src/schema/sections/page-display/index.js | 132 --------- .../src/schema/sections/post-list/filter.js | 7 +- .../src/schema/sections/post-list/list.js | 8 +- .../src/schema/sections/post-list/page.js | 2 +- .../src/schema/sections/post-list/submit.js | 2 - assets/css/frontend/pages.css | 1 - assets/css/frontend/pages/base-3.css | 69 ----- assets/css/frontend/pages/empty-state.css | 165 ----------- assets/css/frontend/pages/sidebar.css | 98 ------ assets/css/frontend/widget-batch3.css | 217 +------------- assets/css/frontend/widget-batch3e.css | 47 +-- assets/css/frontend/widget-batch5.css | 279 ------------------ assets/css/routes/docs.css | 3 +- .../docs/toolbar-search-enhancements.css | 215 ++++++++++++++ assets/css/routes/special.css | 237 --------------- assets/css/routes/user-home.css | 101 +------ assets/js/widget-set.js | 1 - inc/bootstrap.php | 4 +- inc/core-hooks/part-1.php | 143 ++++----- inc/helpers/aksrt-archive.php | 11 +- inc/helpers/aksrt-coupon-order.php | 2 +- inc/helpers/aksrt-header-menu-buttons.php | 2 +- inc/helpers/aksrt-homepage.php | 2 +- ...ksrt-forum.php => aksrt-page-template.php} | 0 inc/helpers/aksrt-pay.php | 2 +- inc/helpers/aksrt-posts-renderer.php | 7 - inc/helpers/aksrt-single-components.php | 19 +- inc/helpers/aksrt-single-render.php | 12 +- inc/helpers/aksrt-template-tags.php | 2 +- inc/helpers/homepage/content.php | 2 +- inc/helpers/homepage/header-components.php | 6 - src/Admin/ExtensionController.php | 1 - src/Admin/GlobalController.php | 24 +- src/Admin/HomepageSettingsRest.php | 7 +- src/Admin/Schema/GlobalSchema.php | 2 - .../Schema/PostList/SchemaPostListList.php | 10 +- src/Admin/Schema/SchemaPageDisplay.php | 64 ---- src/Admin/Schema/SchemaPostList.php | 7 +- src/Content/PayOrders.php | 2 +- src/Core/FrontSubmit.php | 1 - src/Core/FrontSubmitSave.php | 13 +- src/Core/ScriptsPart1c.php | 2 +- src/Core/Shortcodes.php | 4 +- src/Core/WidgetAjax.php | 4 - src/Credits/Credits.php | 2 +- src/Payment/PaymentOrchestrator.php | 2 +- src/Payment/WeChatNotify.php | 7 +- src/Settings/DisplayPageGroups.php | 3 - src/Settings/FacadeBulk.php | 55 +--- src/Settings/PostDisplay.php | 12 +- src/Settings/Settings.php | 2 +- src/Settings/UserRuntime.php | 2 +- src/Widgets/MarketingBlocksWidget.php | 2 +- src/Widgets/TabPostsWidget.php | 9 +- src/Widgets/WidgetMainPosts.php | 23 -- src/Widgets/WidgetOnelinePosts.php | 17 -- templates/pages/page-special.php | 148 ---------- templates/parts/special/special-cover.php | 66 ----- templates/parts/special/special-grid.php | 46 --- templates/parts/submit/context.php | 15 - templates/parts/submit/sidebar-terms.php | 12 - templates/parts/user-home/panel-follow.php | 12 +- tools/admin-contract-map.md | 1 - tools/adr-classes-domain-placement.md | 1 - tools/audit-admin-contracts.php | 1 - 69 files changed, 339 insertions(+), 2057 deletions(-) delete mode 100644 assets/css/frontend/pages/sidebar.css create mode 100644 assets/css/routes/docs/toolbar-search-enhancements.css delete mode 100644 assets/css/routes/special.css rename inc/helpers/{aksrt-forum.php => aksrt-page-template.php} (100%) delete mode 100644 templates/pages/page-special.php delete mode 100644 templates/parts/special/special-cover.php delete mode 100644 templates/parts/special/special-grid.php diff --git a/.gitignore b/.gitignore index d129bf2d..5532bb67 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ CLAUDE.md ask-*.md docs/ +!assets/css/routes/docs/ +assets/css/routes/docs/* +!assets/css/routes/docs/toolbar-search-enhancements.css # Frontend build output and installed dependencies assets/admin/build/ diff --git a/README.md b/README.md index 85e39dae..ba2a32be 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ AKSRT-theme/ │ ├── Core/ # 主题壳层(Setup / Scripts / Templates / SEO / DB…) │ ├── Credits/ # 积分 / 钱包 / 签到 / 邀请 │ ├── Extensions/ # MeiliSearch / 推送 / IP / 内容审核 -│ ├── Forum/ # 论坛服务 + 收银台 │ ├── Frontend/ # 前端渲染辅助 │ ├── Messages/ # 站内信 / 私信 / 公告 / 举报 │ ├── Payment/ # 订单 / 网关 / 售后 / 物流 / 分成 @@ -186,7 +185,6 @@ WordPress 后台左侧 **Admin Bar** → ⚡ **AKSRT 主题设置** - `class-aksrt-settings-extension-runtime.php` - `class-aksrt-settings-credits-runtime.php` - `class-aksrt-settings-category-runtime.php` - - `class-aksrt-settings-forum-shop.php` - `class-aksrt-settings-capabilities.php` - `inc/bootstrap.php` 会先加载 `settings/class-aksrt-settings.php`,再按领域加载这些 delegate 类 - 新增设置运行时逻辑时,优先放入对应 settings 子类;仅把聚合输出、统一入口和跨域装配保留在 `AKSRT_Settings` diff --git a/assets/admin/src/constants/sections/page-display.js b/assets/admin/src/constants/sections/page-display.js index 9430faf1..a60ca446 100644 --- a/assets/admin/src/constants/sections/page-display.js +++ b/assets/admin/src/constants/sections/page-display.js @@ -106,16 +106,6 @@ export const pageDisplaySection = { canonicalDomain: 'page_display', section: 'tag', }), - schemaPage({ - key: 'page-display-special', - name: 'PageDisplaySpecial', - label: '专题页面', - route: '/page-display/special', - title: '专题页面', - desc: '配置专题聚合页的封面、摘要、布局、聚合规则和子页面展示策略。', - canonicalDomain: 'page_display', - section: 'special', - }), schemaPage({ key: 'page-display-user-home', name: 'PageDisplayUserHome', diff --git a/assets/admin/src/pages/content/HomepageSettings.vue b/assets/admin/src/pages/content/HomepageSettings.vue index 9e06b1c9..b1a369f1 100644 --- a/assets/admin/src/pages/content/HomepageSettings.vue +++ b/assets/admin/src/pages/content/HomepageSettings.vue @@ -99,7 +99,7 @@
- 暂无更多栏目,点击“添加栏目”创建分类/专题 Tab。 + 暂无更多栏目,点击“添加栏目”创建分类 Tab。
@@ -267,7 +267,7 @@ async function loadCategories() { const res = await api.getHomepageCategories() const cats = res?.data || [] categoryOptions.value = cats.map(c => ({ - label: `${c.taxonomy === 'topics' ? '[专题] ' : ''}${c.name} (${c.count})`, + label: `${c.name} (${c.count})`, value: c.term_id || c.id, })) } catch { diff --git a/assets/admin/src/schema/sections/page-display/index.js b/assets/admin/src/schema/sections/page-display/index.js index 1cdca884..d010c494 100644 --- a/assets/admin/src/schema/sections/page-display/index.js +++ b/assets/admin/src/schema/sections/page-display/index.js @@ -659,7 +659,6 @@ export const pageDisplaySchemas = { { key: 'header_components_cards_enabled', label: '启用图标卡片', type: 'switch', default: false, help: '在顶部组件区域显示图标卡片入口' }, { key: 'header_components_show_on', label: '按页面类型启用', type: 'checkbox', default: ['home'], options: [ { label: '首页', value: 'home' }, - { label: '专题页', value: 'topics' }, { label: '分类页', value: 'category' }, { label: '标签页', value: 'tag' }, { label: '用户页', value: 'author' }, @@ -1022,135 +1021,4 @@ export const pageDisplaySchemas = { ], }, - /** - * Special/topic page settings - */ - special: { - key: 'page_display.special', - title: '专题页面', - icon: 'fas fa-layer-group', - description: '配置专题聚合页的封面、摘要、布局、聚合规则和子页面展示策略。', - defaults: { - special_cover_enabled: true, - special_summary_enabled: true, - special_summary_length: 200, - special_default_cover: '', - special_layout: 'grid', - special_columns: 2, - special_source_type: 'category', - special_source_ids: '', - special_subpage_display: 'cards', - special_subpage_count: 6, - special_sidebar: true, - special_pagination: 'numeric', - special_per_page: 12, - special_post_count: false, - special_orderby: 'date', - }, - groups: [ - { - key: 'header', - title: '专题头部', - icon: 'fas fa-image', - fields: [ - { key: 'special_cover_enabled', label: '显示专题封面', type: 'switch', default: true, help: '在专题页顶部展示封面图' }, - { key: 'special_summary_enabled', label: '显示专题摘要', type: 'switch', default: true }, - { key: 'special_summary_length', label: '摘要最大长度', type: 'number', default: 200, min: 50, max: 500, dependsOn: { key: 'special_summary_enabled', value: true } }, - { key: 'special_default_cover', label: '默认封面图', type: 'upload', default: '', help: '未设置专题封面时使用的默认图片' }, - ], - }, - { - key: 'layout', - title: '布局设置', - icon: 'fas fa-th-large', - fields: [ - { - key: 'special_layout', - label: '内容布局', - type: 'radio', - default: 'grid', - options: [ - { label: '网格', value: 'grid' }, - { label: '列表', value: 'list' }, - { label: '瀑布流', value: 'masonry' }, - ], - }, - { key: 'special_columns', label: '网格列数', type: 'number', default: 2, min: 1, max: 4, dependsOn: { key: 'special_layout', value: 'grid' } }, - { key: 'special_sidebar', label: '侧边栏', type: 'switch', default: true }, - { key: 'special_post_count', label: '显示文章数', type: 'switch', default: false, help: '在专题列表中显示每篇文章的浏览次数' }, - ], - }, - { - key: 'aggregation', - title: '聚合规则', - icon: 'fas fa-database', - fields: [ - { - key: 'special_source_type', - label: '内容来源', - type: 'radio', - default: 'category', - options: [ - { label: '分类', value: 'category' }, - { label: '标签', value: 'tag' }, - { label: '手动选择', value: 'manual' }, - { label: '最新文章', value: 'latest' }, - ], - }, - { key: 'special_source_ids', label: '来源 ID 列表', type: 'input', default: '', placeholder: '逗号分隔分类/标签 ID', help: '填写分类或标签的 ID,逗号分隔' }, - ], - }, - { - key: 'subpage', - title: '子页面展示', - icon: 'fas fa-clone', - fields: [ - { - key: 'special_subpage_display', - label: '子页面样式', - type: 'radio', - default: 'cards', - options: [ - { label: '卡片', value: 'cards' }, - { label: '列表', value: 'list' }, - { label: '时间线', value: 'timeline' }, - ], - }, - { key: 'special_subpage_count', label: '每页子页面数', type: 'number', default: 6, min: 1, max: 24 }, - ], - }, - { - key: 'pagination', - title: '分页设置', - icon: 'fas fa-ellipsis-h', - fields: [ - { - key: 'special_pagination', - label: '分页模式', - type: 'radio', - default: 'numeric', - options: [ - { label: '数字分页', value: 'numeric' }, - { label: '加载更多', value: 'load_more' }, - { label: '无限滚动', value: 'infinite' }, - ], - }, - { key: 'special_per_page', label: '每页文章数', type: 'number', default: 12, min: 4, max: 48 }, - ], - }, - { - key: 'orderby', - title: '排序设置', - icon: 'fas fa-sort', - fields: [ - { key: 'special_orderby', label: '默认排序', type: 'select', default: 'date', options: [ - { label: '发布时间', value: 'date' }, - { label: '最近更新', value: 'modified' }, - { label: '浏览数', value: 'views' }, - { label: '评论数', value: 'comments' }, - ]}, - ], - }, - ], - }, } diff --git a/assets/admin/src/schema/sections/post-list/filter.js b/assets/admin/src/schema/sections/post-list/filter.js index 428f5458..c5389e56 100644 --- a/assets/admin/src/schema/sections/post-list/filter.js +++ b/assets/admin/src/schema/sections/post-list/filter.js @@ -13,8 +13,6 @@ export const filterSchema = { filter_cat_show_tag: false, filter_tag_show_cat: true, filter_tag_show_tag: false, - filter_topics_show_cat: true, - filter_topics_show_tag: false, custom_filter_show: ['cat', 'tag'], custom_filter: [], cat_custom_filter: [], @@ -26,7 +24,7 @@ export const filterSchema = { icon: 'fas fa-filter', fields: [ { key: 'filter_enabled', label: '启用筛选栏', type: 'switch', default: false }, - { key: 'custom_filter_show', label: '筛选显示页面', type: 'checkbox', default: ['cat', 'tag'], options: [{ label: '分类页', value: 'cat' }, { label: '标签页', value: 'tag' }, { label: '专题页', value: 'topics' }], help: '选择在哪些页面显示筛选栏', dependsOn: { key: 'filter_enabled', value: true } }, + { key: 'custom_filter_show', label: '筛选显示页面', type: 'checkbox', default: ['cat', 'tag'], options: [{ label: '分类页', value: 'cat' }, { label: '标签页', value: 'tag' }], help: '选择在哪些页面显示筛选栏', dependsOn: { key: 'filter_enabled', value: true } }, { key: 'filter_categories', label: '分类筛选', type: 'switch', default: true, dependsOn: { key: 'filter_enabled', value: true } }, { key: 'filter_tags', label: '标签筛选', type: 'switch', default: false, dependsOn: { key: 'filter_enabled', value: true } }, { key: 'filter_sort', label: '排序选项', type: 'switch', default: true, dependsOn: { key: 'filter_enabled', value: true } }, @@ -42,8 +40,6 @@ export const filterSchema = { { key: 'filter_cat_show_tag', label: '分类页:显示标签筛选', type: 'switch', default: false }, { key: 'filter_tag_show_cat', label: '标签页:显示分类筛选', type: 'switch', default: true }, { key: 'filter_tag_show_tag', label: '标签页:显示标签筛选', type: 'switch', default: false }, - { key: 'filter_topics_show_cat', label: '专题页:显示分类筛选', type: 'switch', default: true }, - { key: 'filter_topics_show_tag', label: '专题页:显示标签筛选', type: 'switch', default: false }, ], }, { @@ -92,7 +88,6 @@ export const filterSchema = { { key: 'cats', label: '绑定分类', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [] }, { key: 'cat_s', label: '显示分类筛选', type: 'switch', default: false }, { key: 'tag_s', label: '显示标签筛选', type: 'switch', default: false }, - { key: 'topics_s', label: '显示专题筛选', type: 'switch', default: false }, { key: 'orderby_s', label: '显示排序按钮', type: 'switch', default: true }, { key: 'custom_filters', diff --git a/assets/admin/src/schema/sections/post-list/list.js b/assets/admin/src/schema/sections/post-list/list.js index 9bbd8ad7..4bcc6a73 100644 --- a/assets/admin/src/schema/sections/post-list/list.js +++ b/assets/admin/src/schema/sections/post-list/list.js @@ -16,7 +16,7 @@ export const listSchema = { post_list_author: true, post_list_time: true, list_meta_show: 'like', - list_badge_show: ['pay', 'tag', 'topics', 'cat'], + list_badge_show: ['pay', 'tag', 'cat'], paging_ajax_s: '1', paging_ajax_ias_s: true, ias_max: 3, @@ -34,7 +34,6 @@ export const listSchema = { list_card_home: false, list_card_cat: [], list_card_tag: false, - list_card_topics: false, list_card_author: false, }, groups: [ @@ -64,7 +63,6 @@ export const listSchema = { { label: '首页', value: 'home' }, { label: '分类页', value: 'cat' }, { label: '标签页', value: 'tag' }, - { label: '专题页', value: 'topics' }, ], }, ], @@ -99,11 +97,10 @@ export const listSchema = { key: 'list_badge_show', label: '列表徽章', type: 'checkbox', - default: ['pay', 'tag', 'topics', 'cat'], + default: ['pay', 'tag', 'cat'], options: [ { label: '付费', value: 'pay' }, { label: '分类', value: 'cat' }, - { label: '专题', value: 'topics' }, { label: '标签', value: 'tag' }, ], }, @@ -234,7 +231,6 @@ export const listSchema = { default: [], }, { key: 'list_card_tag', label: '标签页卡片模式', type: 'switch', default: false }, - { key: 'list_card_topics', label: '专题页卡片模式', type: 'switch', default: false }, { key: 'list_card_author', label: '用户页卡片模式', type: 'switch', default: false }, ], }, diff --git a/assets/admin/src/schema/sections/post-list/page.js b/assets/admin/src/schema/sections/post-list/page.js index f9b20515..14a6bdd9 100644 --- a/assets/admin/src/schema/sections/post-list/page.js +++ b/assets/admin/src/schema/sections/post-list/page.js @@ -124,7 +124,7 @@ export const pageSchema = { { label: '纯文字', value: 'text' }, ], dependsOn: { key: 'post_related_enabled', value: true }, help: '对齐 Zibll 相关文章三种样式' }, { key: 'post_related_source', label: '推荐来源', type: 'radio', default: 'category', options: [ - { label: '同分类/标签/专题', value: 'category' }, + { label: '同分类/标签', value: 'category' }, { label: '同标签', value: 'tag' }, { label: '随机', value: 'random' }, ], dependsOn: { key: 'post_related_enabled', value: true } }, diff --git a/assets/admin/src/schema/sections/post-list/submit.js b/assets/admin/src/schema/sections/post-list/submit.js index eb911895..1cffc3fc 100644 --- a/assets/admin/src/schema/sections/post-list/submit.js +++ b/assets/admin/src/schema/sections/post-list/submit.js @@ -13,7 +13,6 @@ export const submitSchema = { front_submit_category: true, post_article_cat: [], front_submit_tags: true, - post_article_topics_s: false, post_article_custom_filter_s: true, front_submit_custom_fields: '', front_submit_review_mode: 'pending', @@ -63,7 +62,6 @@ export const submitSchema = { { key: 'front_submit_guest_enabled', label: '允许免登录投稿', type: 'switch', default: false, help: '开启后访客可投稿;文章归属到下方用户', dependsOn: { key: 'front_submit_enabled', value: true } }, { key: 'post_article_user', label: '免登录归属用户', type: 'user_select', default: 0, help: '免登录投稿时文章归属的用户,搜索选择', dependsOn: { key: 'front_submit_guest_enabled', value: true } }, { key: 'front_submit_tags', label: '标签输入', type: 'switch', default: true, dependsOn: { key: 'front_submit_enabled', value: true } }, - { key: 'post_article_topics_s', label: '专题选择', type: 'switch', default: false, help: '投稿时可选择专题分类', dependsOn: { key: 'front_submit_enabled', value: true } }, { key: 'post_article_custom_filter_s', label: '高级筛选选择', type: 'switch', default: true, help: '投稿时可选择自定义筛选维度值', dependsOn: { key: 'front_submit_enabled', value: true } }, { key: 'front_submit_custom_fields', label: '自定义字段', type: 'textarea', default: '', placeholder: '每行一个:field_key|字段名称|类型(input/textarea/select)', dependsOn: { key: 'front_submit_enabled', value: true } }, ], diff --git a/assets/css/frontend/pages.css b/assets/css/frontend/pages.css index 7c417e8f..f17dacc2 100644 --- a/assets/css/frontend/pages.css +++ b/assets/css/frontend/pages.css @@ -1,4 +1,3 @@ @import url("pages/base.css"); -@import url("pages/sidebar.css"); @import url("pages/empty-state.css"); @import url("pages/submit.css"); diff --git a/assets/css/frontend/pages/base-3.css b/assets/css/frontend/pages/base-3.css index fc690cf4..cc5da979 100644 --- a/assets/css/frontend/pages/base-3.css +++ b/assets/css/frontend/pages/base-3.css @@ -122,72 +122,3 @@ color: var(--color-ink-3); } -/* ============================================================ - * Forum Page - * ============================================================ */ - -.aksrt-forum-header { - padding: clamp(32px, 5vw, 64px) 0 clamp(16px, 3vw, 32px); - background: linear-gradient(135deg, var(--color-primary-soft, #e6f4ff) 0%, var(--surface-2, #f5f7fa) 100%); - margin-bottom: 32px; - text-align: center; -} - -.aksrt-forum-header__title { - font: 700 clamp(28px, 4vw, 40px)/1.15 var(--font-display, inherit); - margin: 0 0 8px; - color: var(--color-ink); -} - -.aksrt-forum-header__desc { - margin: 0 0 24px; - color: var(--color-ink-2, #666); - font-size: 15px; -} - -.aksrt-forum-header__stats { - display: flex; - justify-content: center; - gap: 32px; -} - -.aksrt-forum-header__stat-num { - display: block; - font-size: 28px; - font-weight: 700; - color: var(--color-primary); -} - -.aksrt-forum-header__stat-label { - font-size: 13px; - color: var(--color-ink-3, #999); -} - -.aksrt-forum__layout { - display: grid; - grid-template-columns: 1fr 280px; - gap: 24px; -} - -@media (max-width: 1023px) { - .aksrt-forum__layout { - grid-template-columns: 1fr; - } -} - -.aksrt-forum-section__title { - display: flex; - align-items: center; - gap: 8px; - font-size: 16px; - font-weight: 600; - color: var(--color-ink); - margin: 0 0 16px; - padding-bottom: 8px; - border-bottom: 1px solid var(--color-line, #e8e8e8); -} - -.aksrt-forum-section__title i { - color: var(--color-primary); -} - diff --git a/assets/css/frontend/pages/empty-state.css b/assets/css/frontend/pages/empty-state.css index 33ef4e63..59af7a5b 100644 --- a/assets/css/frontend/pages/empty-state.css +++ b/assets/css/frontend/pages/empty-state.css @@ -1,167 +1,3 @@ -/* Empty state */ -.aksrt-forum__empty { - text-align: center; - padding: 48px 24px; - color: var(--color-ink-3, #999); -} - -.aksrt-forum__empty i { - font-size: 48px; - margin-bottom: 16px; - opacity: 0.3; -} - -.aksrt-forum-header { - text-align: left; -} - -.aksrt-forum-header__content { - display: flex; - flex-wrap: wrap; - align-items: flex-end; - justify-content: space-between; - gap: 20px; - width: min(1200px, calc(100% - 32px)); - margin: 0 auto 20px; -} - -.aksrt-forum-header__actions { - display: flex; - flex-wrap: wrap; - gap: 10px; -} - -.aksrt-forum-header__action { - display: inline-flex; - align-items: center; - gap: 8px; - padding: 10px 16px; - border-radius: 999px; - border: 1px solid var(--color-line, #d9e2f2); - background: rgba(255, 255, 255, 0.78); - color: var(--color-ink); - text-decoration: none; -} - -.aksrt-forum-header__action--primary { - border-color: var(--color-primary); - background: var(--color-primary); - color: #fff; -} - -.aksrt-forum-header__stats { - flex-wrap: wrap; -} - -.aksrt-forum-header__stat { - min-width: 92px; -} - -.aksrt-forum-ops { - margin-bottom: 24px; -} - -.aksrt-forum-ops__card { - padding: 20px; - background: var(--surface-1, #fff); - border: 1px solid var(--color-line, #e8e8e8); - border-radius: 12px; -} - -.aksrt-forum-ops__list { - margin: 0; - padding-left: 18px; - color: var(--color-ink-2, #666); - line-height: 1.7; -} - -.aksrt-forum-board-card__link { - display: flex; - gap: 12px; - width: 100%; - color: inherit; - text-decoration: none; -} - -.aksrt-forum-board-card__head { - display: flex; - align-items: center; - justify-content: space-between; - gap: 10px; -} - -.aksrt-forum-board-card__status { - display: inline-flex; - align-items: center; - padding: 2px 8px; - border-radius: 999px; - background: var(--surface-2, #f0f5ff); - color: var(--color-primary); - font-size: 11px; -} - -.aksrt-forum-topic-row__title-wrap { - display: flex; - align-items: center; - flex-wrap: wrap; - gap: 6px; - margin-bottom: 4px; -} - -.aksrt-forum-topic-row__badge { - display: inline-flex; - align-items: center; - padding: 2px 8px; - border-radius: 999px; - font-size: 11px; - font-weight: 600; -} - -.aksrt-forum-topic-row__badge--sticky { - background: #e6f4ff; - color: #1677ff; -} - -.aksrt-forum-topic-row__badge--featured { - background: #f6ffed; - color: #389e0d; -} - -.aksrt-forum-topic-row__board { - color: var(--color-primary); - text-decoration: none; -} - -.aksrt-forum-sidebar-card__empty { - margin: 0; - color: var(--color-ink-3, #999); - font-size: 13px; -} - -.aksrt-forum-sidebar-card__item--stack { - display: block; -} - -.aksrt-forum-sidebar-card__item--stack strong, -.aksrt-forum-sidebar-card__item--stack span { - display: block; -} - -@media (max-width: 767px) { - .aksrt-forum-header__content { - width: calc(100% - 24px); - } - - .aksrt-forum-header__actions { - width: 100%; - } - - .aksrt-forum-header__action { - width: 100%; - justify-content: center; - } -} - /* ============================================================ * 文章归档(page-archives.php + [aksrt_archive] 短代码) * Phase 10 视觉收口:此前 .aksrt-archives 无样式。 @@ -289,4 +125,3 @@ color: var(--color-ink); line-height: 1.2; } - diff --git a/assets/css/frontend/pages/sidebar.css b/assets/css/frontend/pages/sidebar.css deleted file mode 100644 index 1b7466cf..00000000 --- a/assets/css/frontend/pages/sidebar.css +++ /dev/null @@ -1,98 +0,0 @@ -/* Sidebar */ -.aksrt-forum-sidebar-card { - background: var(--surface-1, #fff); - border: 1px solid var(--color-line, #e8e8e8); - border-radius: 8px; - padding: 16px; - margin-bottom: 16px; -} - -.aksrt-forum-sidebar-card__title { - display: flex; - align-items: center; - gap: 8px; - margin: 0 0 12px; - font-size: 14px; - font-weight: 600; - color: var(--color-ink); -} - -.aksrt-forum-sidebar-card__title i { - color: var(--color-primary); -} - -.aksrt-forum-sidebar-card__list { - list-style: none; - margin: 0; - padding: 0; -} - -.aksrt-forum-sidebar-card__item { - display: flex; - align-items: center; - gap: 8px; - padding: 8px 0; - border-bottom: 1px solid var(--color-line, #f0f0f0); -} - -.aksrt-forum-sidebar-card__item:last-child { - border-bottom: none; -} - -.aksrt-forum-sidebar-card__rank { - width: 20px; - height: 20px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 4px; - background: var(--surface-2, #f5f7fa); - font-size: 11px; - font-weight: 600; - color: var(--color-ink-3, #999); - flex-shrink: 0; -} - -.aksrt-forum-sidebar-card__item:nth-child(1) .aksrt-forum-sidebar-card__rank { background: #fff1f0; color: #f5222d; } -.aksrt-forum-sidebar-card__item:nth-child(2) .aksrt-forum-sidebar-card__rank { background: #fff7e6; color: #fa8c16; } -.aksrt-forum-sidebar-card__item:nth-child(3) .aksrt-forum-sidebar-card__rank { background: var(--color-primary-soft); color: var(--color-primary); } - -.aksrt-forum-sidebar-card__link { - flex: 1; - font-size: 13px; - color: var(--color-ink-2, #666); - text-decoration: none; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.aksrt-forum-sidebar-card__link:hover { - color: var(--color-primary); -} - -.aksrt-forum-sidebar-card__views { - font-size: 11px; - color: var(--color-ink-3, #999); - flex-shrink: 0; -} - -.aksrt-forum-sidebar-card__content ul { - list-style: none; - margin: 0; - padding: 0; -} - -.aksrt-forum-sidebar-card__content li { - padding: 4px 0; - font-size: 13px; - color: var(--color-ink-2, #666); - line-height: 1.6; -} - -.aksrt-forum-sidebar-card__content li::before { - content: '•'; - color: var(--color-primary); - margin-right: 6px; -} - diff --git a/assets/css/frontend/widget-batch3.css b/assets/css/frontend/widget-batch3.css index 638c6bac..ee42ba19 100644 --- a/assets/css/frontend/widget-batch3.css +++ b/assets/css/frontend/widget-batch3.css @@ -1,5 +1,5 @@ /** - * Batch3 widgets: iframe, combo info, text title, user lists, plate widgets. + * Batch3 widgets: iframe, combo info, text title, and user lists. * @package AKSRT */ @@ -206,186 +206,6 @@ text-overflow: ellipsis; } -/* ---- Forum plate lists ---- */ -.aksrt-plate-lists { - display: flex; - flex-direction: column; - gap: 10px; -} -.aksrt-plate-item { - display: flex; - gap: 12px; - align-items: flex-start; - text-decoration: none; - color: inherit; - padding: 6px 0; - border-bottom: 1px dashed var(--color-line, #e5e7eb); -} -.aksrt-plate-item:last-child { - border-bottom: 0; -} -.aksrt-plate-item__thumb { - width: 48px; - height: 48px; - border-radius: 10px; - overflow: hidden; - flex-shrink: 0; - background: var(--surface-2, #f3f4f6); - display: flex; - align-items: center; - justify-content: center; - color: var(--color-primary, #3b82f6); - font-size: 18px; -} -.aksrt-plate-item__thumb img { - width: 100%; - height: 100%; - object-fit: cover; -} -.aksrt-plate-item__body { - min-width: 0; - flex: 1; -} -.aksrt-plate-item__title { - font-weight: 700; - font-size: 14px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.aksrt-plate-item__desc { - font-size: 12px; - color: var(--muted-2-color, #888); - margin-top: 3px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.aksrt-plate-item__meta { - font-size: 11px; - color: var(--color-ink-4, #999); - margin-top: 4px; -} -.aksrt-plate-cards { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 12px; -} -@media (max-width: 575.98px) { - .aksrt-plate-cards { - grid-template-columns: 1fr; - } -} -.aksrt-plate-card { - display: block; - text-decoration: none; - color: inherit; - border-radius: 10px; - overflow: hidden; - border: 1px solid var(--color-line, #e5e7eb); - background: var(--surface-1, #fff); -} -.aksrt-plate-card__cover { - height: 88px; - background: var(--surface-2, #f3f4f6) center/cover no-repeat; -} -.aksrt-plate-card__title { - font-weight: 700; - font-size: 13px; - padding: 10px 10px 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.aksrt-plate-card__meta { - display: flex; - justify-content: space-between; - font-size: 11px; - color: var(--muted-2-color, #888); - padding: 0 10px 10px; -} - -/* ---- Plate info ---- */ -.aksrt-plate-info { - border-radius: 10px; - overflow: hidden; - border: 1px solid var(--color-line, #e5e7eb); - background: var(--surface-1, #fff); - margin-bottom: 12px; -} -.aksrt-plate-info__cover { - height: 90px; - background: var(--surface-2, #f3f4f6) center/cover no-repeat; -} -.aksrt-plate-info__body { - padding: 12px 14px 14px; -} -.aksrt-plate-info__title { - display: block; - font-weight: 700; - font-size: 16px; - color: inherit; - text-decoration: none; - margin-bottom: 6px; -} -.aksrt-plate-info__desc { - font-size: 12px; - color: var(--muted-2-color, #888); - line-height: 1.5; - margin-bottom: 10px; -} -.aksrt-plate-info__stats { - display: flex; - gap: 14px; - font-size: 12px; - color: var(--color-ink-3, #666); -} -.aksrt-plate-info__stats i { - margin-right: 4px; - opacity: .75; -} - -/* ---- Plate moderators ---- */ -.aksrt-plate-mods { - margin-bottom: 12px; -} -.aksrt-plate-mods__head { - margin-bottom: 10px; -} -.aksrt-plate-mods__list { - display: flex; - flex-direction: column; - gap: 8px; -} -.aksrt-plate-mods__item { - display: flex; - align-items: center; - gap: 10px; - text-decoration: none; - color: inherit; -} -.aksrt-plate-mods__avatar { - width: 40px; - height: 40px; - border-radius: 50%; - object-fit: cover; -} -.aksrt-plate-mods__name { - flex: 1; - min-width: 0; - font-size: 13px; - font-weight: 600; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.aksrt-plate-mods__role { - font-size: 11px; - color: var(--color-primary, #3b82f6); - flex-shrink: 0; -} - - /* ---- FAQ ---- */ .aksrt-faq { margin-bottom: 16px; } .aksrt-faq__search { display: flex; gap: 8px; margin-bottom: 14px; } @@ -455,38 +275,3 @@ text-decoration: none; font-size: 13px; } - -/* ---- Forum topic lists ---- */ -.aksrt-ftopic-list { list-style: none; margin: 0; padding: 0; } -.aksrt-ftopic-list__item { - display: flex; - align-items: flex-start; - gap: 8px; - padding: 8px 0; - border-bottom: 1px dashed var(--color-line, #e5e7eb); -} -.aksrt-ftopic-list__item:last-child { border-bottom: 0; } -.aksrt-ftopic-list__link { - flex: 1; - min-width: 0; - color: inherit; - text-decoration: none; - font-size: 13px; - line-height: 1.45; -} -.aksrt-ftopic-list__views { - flex-shrink: 0; - font-size: 11px; - color: var(--muted-2-color, #999); -} -.aksrt-ftopic-list.is-detail .aksrt-ftopic-list__item { flex-direction: column; gap: 4px; } -.aksrt-ftopic-list__meta { - display: flex; - gap: 10px; - font-size: 11px; - color: var(--muted-2-color, #999); -} - -/* Forum widget sidebar shell */ -.aksrt-forum-widget-zone { margin-top: 12px; } -.aksrt-forum-widget-zone .zib-widget { margin-bottom: 14px; } diff --git a/assets/css/frontend/widget-batch3e.css b/assets/css/frontend/widget-batch3e.css index 896e4303..05a04663 100644 --- a/assets/css/frontend/widget-batch3e.css +++ b/assets/css/frontend/widget-batch3e.css @@ -1,5 +1,5 @@ /** - * Batch3e: author card, forum topic terms, forum tab topics. + * Batch3e: author card. */ .aksrt-author-card { @@ -76,48 +76,3 @@ text-decoration: none; font-size: 13px; } - -.aksrt-ftag-list { display: flex; flex-direction: column; gap: 6px; } -.aksrt-ftag-list.is-card { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 8px; -} -.aksrt-ftag-item { - display: flex; - align-items: center; - gap: 8px; - padding: 8px 10px; - border-radius: 8px; - text-decoration: none; - color: inherit; - background: var(--surface-2, #f8fafc); - font-size: 13px; -} -.aksrt-ftag-item__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.aksrt-ftag-item__count { font-size: 11px; color: var(--muted-2-color, #999); } - -.aksrt-ftab { margin-bottom: 10px; } -.aksrt-ftab__nav { - list-style: none; - display: flex; - flex-wrap: wrap; - gap: 6px; - margin: 0 0 10px; - padding: 0; -} -.aksrt-ftab__btn { - border: 0; - background: var(--surface-2, #f3f4f6); - border-radius: 999px; - padding: 5px 12px; - font-size: 12px; - cursor: pointer; -} -.aksrt-ftab__btn.is-active { - background: var(--color-primary, #3b82f6); - color: #fff; -} -.aksrt-ftab__panel { display: none; } -.aksrt-ftab__panel.is-active { display: block; } -.aksrt-ftab__empty { font-size: 12px; color: var(--muted-2-color, #999); margin: 0; } diff --git a/assets/css/frontend/widget-batch5.css b/assets/css/frontend/widget-batch5.css index b38743a8..b649d729 100644 --- a/assets/css/frontend/widget-batch5.css +++ b/assets/css/frontend/widget-batch5.css @@ -810,64 +810,6 @@ /* 徽章入口与弹窗样式统一由 assets/css/frontend/medal.css 提供。 */ -/* Forum tab topics (batch6) */ -.aksrt-ftab__nav { - display: flex; - gap: 6px; - list-style: none; - margin: 0 0 10px; - padding: 0; - overflow-x: auto; -} -.aksrt-ftab__btn { - border: 0; - background: var(--surface-2, #f3f4f6); - border-radius: 999px; - padding: 5px 12px; - font-size: 13px; - cursor: pointer; - color: inherit; -} -.aksrt-ftab__btn.is-active { - background: var(--color-primary, #3b82f6); - color: #fff; -} -.aksrt-ftab__panel { display: none; } -.aksrt-ftab__panel.is-active { display: block; } -.aksrt-ftab__empty { font-size: 13px; color: var(--muted-2-color, #999); padding: 8px 0; } -.aksrt-ftopic-list { list-style: none; margin: 0; padding: 0; } -.aksrt-ftopic-list__item { - display: flex; - align-items: center; - justify-content: space-between; - gap: 8px; - padding: 7px 0; - border-bottom: 1px dashed var(--color-line, #eee); - font-size: 13px; -} -.aksrt-ftopic-list__item:last-child { border-bottom: 0; } -.aksrt-ftopic-list__link { - color: inherit; - text-decoration: none; - flex: 1; - min-width: 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.aksrt-ftopic-list__views { color: var(--muted-2-color, #999); font-size: 12px; flex-shrink: 0; } -.aksrt-ftopic-list__meta { - display: flex; - gap: 8px; - font-size: 11px; - color: var(--muted-2-color, #999); - margin-top: 4px; -} -.aksrt-ftopic-list.is-detail .aksrt-ftopic-list__item { - flex-direction: column; - align-items: flex-start; -} - /* User ranking extras (batch8) */ .aksrt-user-ranking__item { align-items: center; } .aksrt-user-ranking__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } @@ -879,94 +821,6 @@ text-overflow: ellipsis; } -/* ---- batch9: plate info actions / mods grid / board list / term polish ---- */ -.aksrt-plate-info__cover.is-icon { - display: flex; - align-items: center; - justify-content: center; - font-size: 32px; - color: var(--color-primary, #3b82f6); - background: linear-gradient(135deg, #eff6ff, #f5f3ff); -} -.aksrt-plate-info__actions { - display: flex; - flex-wrap: wrap; - gap: 8px; - margin-top: 12px; -} -.aksrt-plate-info__btn { - display: inline-flex; - align-items: center; - gap: 6px; - border: 0; - border-radius: 999px; - padding: 6px 12px; - font-size: 12px; - font-weight: 600; - cursor: pointer; - text-decoration: none; - line-height: 1.2; -} -.aksrt-plate-info__follow { - background: #ef4444; - color: #fff !important; -} -.aksrt-plate-info__follow.is-followed { - background: var(--surface-2, #e5e7eb); - color: inherit !important; -} -.aksrt-plate-info__compose { - background: var(--color-primary, #3b82f6); - color: #fff !important; -} - -.aksrt-plate-mods.style-grid .aksrt-plate-mods__list { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 10px; -} -.aksrt-plate-mods.style-grid .aksrt-plate-mods__item { - flex-direction: column; - text-align: center; - gap: 4px; -} -.aksrt-plate-mods.style-grid .aksrt-plate-mods__name { - font-size: 12px; - width: 100%; -} -.aksrt-plate-mods.style-grid .aksrt-plate-mods__role { - font-size: 10px; -} -.aksrt-plate-mods__item.role-author .aksrt-plate-mods__role, -.aksrt-plate-mods__item.role-super .aksrt-plate-mods__role { - color: #b45309; -} - -.aksrt-forum-widget__boards .aksrt-forum-widget__name { - flex: 1; - min-width: 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.aksrt-forum-widget__boards .aksrt-forum-widget__count { - margin-left: 8px; - color: var(--muted-2-color, #999); - font-size: 12px; - flex-shrink: 0; -} -.aksrt-forum-widget__boards.style-mini .aksrt-forum-widget__board a { - gap: 8px; -} -.aksrt-forum-widget__thumb { - width: 28px; - height: 28px; - border-radius: 6px; - object-fit: cover; - flex-shrink: 0; - margin-right: 4px; -} - .aksrt-tag-cloud .c-blue-2 { background: #bfdbfe; color: #1e40af; } .aksrt-tag-cloud .c-green-2 { background: #bbf7d0; color: #166534; } .aksrt-tag-cloud .c-yellow-2 { background: #fde68a; color: #92400e; } @@ -2255,77 +2109,10 @@ html.dark .zib-widget.widget_aksrt_announcement, padding: 1px 8px; } -.aksrt-forum-widget__item.is-top .aksrt-forum-widget__rank { - background: var(--theme-color, #f04494); - color: #fff; -} .tag-cloud.aksrt-tag-cloud a { transition: transform .15s ease; } .tag-cloud.aksrt-tag-cloud a:hover { transform: translateY(-1px); } -/* batch22-24 forum/user residual */ -.forum-posts.mini.aksrt-ftopic-mini, -.forum-posts.detail.aksrt-ftopic-detail { - display: block; - position: relative; - padding: 12px 0; - border-bottom: 1px solid var(--color-line-soft, #f0f1f3); -} -.forum-posts.mini.aksrt-ftopic-mini:last-child, -.forum-posts.detail.aksrt-ftopic-detail:last-child { border-bottom: 0; } -.forum-posts .forum-posts-header .avatar-img img, -.forum-posts .avatar-img img { - width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; -} -.forum-posts.detail .avatar-img img { width: 40px; height: 40px; } -.forum-posts .forum-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; } -.forum-posts .forum-title a { color: inherit; text-decoration: none; } -.forum-posts .forum-title a:hover { color: var(--theme-color, #f04494); } -.forum-posts .item-meta { gap: 2px; } -.forum-posts .forum-excerpt { line-height: 1.5; } -.forum-posts badge.img-badge { z-index: 2; } - -.plate-lists .plate-item, -.aksrt-plate-lists .plate-item { - display: flex; - gap: 12px; - align-items: flex-start; - padding: 10px 0; - border-bottom: 1px solid var(--color-line-soft, #f0f1f3); - color: inherit; - text-decoration: none; -} -.plate-lists .plate-item:last-child { border-bottom: 0; } -.plate-thumb, -.aksrt-plate-item__thumb { - width: 48px; height: 48px; border-radius: 10px; overflow: hidden; - flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; - background: var(--surface-2, #f3f4f6); color: #999; -} -.plate-thumb img, .aksrt-plate-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; } -.panel-plate.scroll-plate, -.aksrt-plate-cards { - display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; -} -.plate-card, .aksrt-plate-card { - flex: 0 0 160px; width: 160px; text-decoration: none; color: inherit; -} -.plate-card .plate-thumb, .aksrt-plate-card__cover { - width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; - background: var(--surface-2, #f3f4f6); display: flex; align-items: center; justify-content: center; -} -.plate-card .plate-thumb img, .aksrt-plate-card__cover img { width: 100%; height: 100%; object-fit: cover; } - -.moderator-box.aksrt-plate-mods__list, -.aksrt-plate-mods__list { display: flex; flex-direction: column; gap: 12px; } -.aksrt-plate-mods.style-grid .aksrt-plate-mods__list { - display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; -} -.aksrt-plate-mods__item { gap: 4px; } -.aksrt-plate-mods__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; } -.aksrt-plate-mods.style-grid .aksrt-plate-mods__item { text-align: center; } -.aksrt-plate-mods.style-grid .aksrt-plate-mods__avatar { width: 48px; height: 48px; margin: 0 auto 6px; } - .user-ranking-box .user-ranking-item, .aksrt-user-ranking-box .user-ranking-item { position: relative; } .user-ranking-item .avatar-img img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; } @@ -2334,60 +2121,6 @@ html.dark .zib-widget.widget_aksrt_announcement, .aksrt-category-recommend__card[data-aksrt-animate] { will-change: transform, opacity; } .aksrt-category-recommend__posts.posts-mini-wrap { margin-top: 8px; } -.aksrt-plate-info.plate-info-sidebar { overflow: hidden; } -.aksrt-plate-info__cover.plate-thumb { - width: 100%; height: 110px; border-radius: 12px; overflow: hidden; - background: var(--surface-2, #f3f4f6); display: flex; align-items: center; justify-content: center; -} -.aksrt-plate-info__cover.plate-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; } -.aksrt-plate-info__stats.count-mates { gap: 8px; flex-wrap: wrap; } - -.aksrt-ftag-list { display: flex; flex-wrap: wrap; gap: 8px; } -.aksrt-ftag-item.is-card { min-width: 120px; justify-content: space-between; } - - -/* batch25-27 residual */ -.aksrt-forum-widget__list.is-mini .forum-posts.mini { border-bottom: 1px solid var(--color-line-soft, #f0f1f3); } -.aksrt-forum-widget__list.is-mini .forum-posts.mini:last-child { border-bottom: 0; } -.aksrt-forum-widget__rank-row { - display: flex; - align-items: flex-start; - gap: 8px; - padding: 8px 0; - border-bottom: 1px solid var(--color-line-soft, #f0f1f3); -} -.aksrt-forum-widget__rank-row:last-child { border-bottom: 0; } -.aksrt-forum-widget__rank-row .forum-posts.mini { - flex: 1; - min-width: 0; - padding: 0; - border: 0; -} -.aksrt-forum-widget__rank { - flex: 0 0 24px; - width: 24px; - height: 24px; - margin-top: 4px; - border-radius: 6px; - background: var(--surface-2, #f3f4f6); - color: var(--muted-2-color, #999); - font-size: 12px; - font-weight: 700; - display: inline-flex; - align-items: center; - justify-content: center; -} -.aksrt-forum-widget__rank-row badge.img-badge { position: static; flex: 0 0 auto; margin-top: 4px; } - -/* batch28-30 residual */ -.aksrt-ftab.widget-tab-posts .aksrt-ftab__nav { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; } -.aksrt-ftab__btn.widget-tab-posts__tab { - border: 0; background: var(--surface-2, #f3f4f6); color: inherit; - border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; -} -.aksrt-ftab__btn.is-active { background: var(--theme-color, #f04494); color: #fff; } -.aksrt-ftab__panel[hidden] { display: none !important; } -.aksrt-ftab__panel.is-ajax-loading { opacity: .65; pointer-events: none; } /* batch34-36 residual */ .widget-hot-posts--graphic .hot-posts-graphic { margin-bottom: 12px; border-radius: 8px; overflow: hidden; } .widget-hot-posts--graphic .hot-posts-graphic .graphic { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-2, #f3f4f6); } @@ -2504,18 +2237,6 @@ html.dark .zib-widget.widget_aksrt_announcement, .widget-search-box.is-affix { position: sticky; top: 72px; } -/* batch40-42 residual */ -.aksrt-plate-info .count-mates { - gap: 8px; margin-top: 12px; padding-top: 10px; - border-top: 1px solid var(--color-line, rgba(0,0,0,.06)); -} -.aksrt-plate-info .count-mates item, -.aksrt-plate-info .count-mates .mate-views, -.aksrt-plate-info .count-mates .mate-reply, -.aksrt-plate-info .count-mates .mate-follow { - flex: 1 1 0; min-width: 0; text-align: center; -} -.aksrt-plate-info .count-mates .em14 { font-weight: 700; line-height: 1.2; } /* batch43-45 residual */ .aksrt-product-widget__item--mini { gap: 10px; padding: 8px 0; diff --git a/assets/css/routes/docs.css b/assets/css/routes/docs.css index 41386c37..7a51e71b 100644 --- a/assets/css/routes/docs.css +++ b/assets/css/routes/docs.css @@ -8,7 +8,6 @@ @import url("docs/depth-based-indentation.css"); @import url("docs/collapsible-state.css"); @import url("docs/active-item-highlight-bar.css"); -@import url("docs/special-page-grid.css"); -@import url("docs/special-cover-enhancements.css"); +@import url("docs/toolbar-search-enhancements.css"); @import url("docs/pagination-inside-search-results.css"); @import url("docs/empty-state-enhancement.css"); diff --git a/assets/css/routes/docs/toolbar-search-enhancements.css b/assets/css/routes/docs/toolbar-search-enhancements.css new file mode 100644 index 00000000..5ee80ebf --- /dev/null +++ b/assets/css/routes/docs/toolbar-search-enhancements.css @@ -0,0 +1,215 @@ +/* ── AJAX Search Results ── */ + +.aksrt-doc-search__results { + max-width: 680px; + margin: -8px auto 16px; + background: var(--surface-1, #fff); + border: 1px solid var(--color-line, #e3e8ef); + border-radius: 12px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); + max-height: 400px; + overflow-y: auto; +} + +.aksrt-doc-search__result { + display: block; + padding: 12px 16px; + border-bottom: 1px solid var(--color-line, #f0f2f5); + text-decoration: none; + color: inherit; + transition: background 0.15s; +} + +.aksrt-doc-search__result:last-child { + border-bottom: none; +} + +.aksrt-doc-search__result:hover { + background: var(--surface-2, #f8fafc); +} + +.aksrt-doc-search__result strong { + display: block; + font-size: 14px; + color: var(--color-ink); + margin-bottom: 4px; +} + +.aksrt-doc-search__result p { + margin: 0; + font-size: 12px; + color: var(--color-ink-4, #8690a0); + line-height: 1.5; +} + +.aksrt-doc-search__empty { + padding: 20px 16px; + text-align: center; + color: var(--color-ink-4); + font-size: 14px; +} + +/* ============================================================ + * Document Toolbar — category chips + sort + * ============================================================ */ +.aksrt-doc-toolbar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + flex-wrap: wrap; + margin-bottom: 20px; + padding: 12px 16px; + background: var(--surface-2); + border-radius: var(--radius); + border: 1px solid var(--color-line-soft); +} + +.aksrt-doc-toolbar__chips { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 8px; +} + +.aksrt-doc-toolbar__chip { + display: inline-flex; + align-items: center; + min-height: 32px; + padding: 0 14px; + border-radius: var(--radius-pill); + background: var(--surface-1); + color: var(--color-ink-2); + text-decoration: none; + font-size: 13px; + font-weight: 500; + border: 1px solid var(--color-line); + cursor: pointer; + transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); +} + +.aksrt-doc-toolbar__chip:hover { + border-color: var(--color-primary); + color: var(--color-primary); +} + +.aksrt-doc-toolbar__chip.is-active { + background: var(--color-primary); + color: var(--color-on-primary); + border-color: var(--color-primary); +} + +.aksrt-doc-toolbar__meta { + font-size: 12px; + color: var(--color-ink-4); + font-weight: 600; +} + +/* ============================================================ + * Loading State + * ============================================================ */ +.aksrt-doc-loading { + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + padding: 48px 20px; + color: var(--color-ink-4); + font-size: 14px; +} + +.aksrt-doc-loading__spinner { + width: 20px; + height: 20px; + border: 2px solid var(--color-line); + border-top-color: var(--color-primary); + border-radius: 50%; + animation: aksrt-doc-spin 0.6s linear infinite; +} + +@keyframes aksrt-doc-spin { + to { transform: rotate(360deg); } +} + +/* ============================================================ + * Search Results Takeover — when search replaces main list + * ============================================================ */ +.aksrt-doc-nav__main.is-search-active .aksrt-doc-nav__grid { + display: none; +} + +.aksrt-doc-nav__main.is-search-active .aksrt-doc-nav__empty { + display: none; +} + +.aksrt-doc-search__takeover { + display: flex; + flex-direction: column; + gap: 0; +} + +.aksrt-doc-search__takeover-item { + display: flex; + align-items: flex-start; + gap: 12px; + padding: 14px 0; + border-bottom: 1px solid var(--color-line-soft); + text-decoration: none; + color: inherit; + transition: background var(--dur-fast) var(--ease); +} + +.aksrt-doc-search__takeover-item:last-child { + border-bottom: none; +} + +.aksrt-doc-search__takeover-item:hover { + background: var(--surface-2); + border-radius: var(--radius-sm); +} + +.aksrt-doc-search__takeover-icon { + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + border-radius: var(--radius-sm); + background: var(--color-primary-softer); + color: var(--color-primary); + font-size: 14px; + flex-shrink: 0; + margin-top: 2px; +} + +.aksrt-doc-search__takeover-body { + flex: 1; + min-width: 0; +} + +.aksrt-doc-search__takeover-title { + margin: 0 0 4px; + font-size: 14px; + font-weight: 600; + color: var(--color-ink); + line-height: 1.4; +} + +.aksrt-doc-search__takeover-excerpt { + margin: 0; + font-size: 12px; + color: var(--color-ink-4); + line-height: 1.5; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.aksrt-doc-search__takeover-meta { + display: flex; + gap: 12px; + margin-top: 4px; + font-size: 11px; + color: var(--color-ink-4); +} diff --git a/assets/css/routes/special.css b/assets/css/routes/special.css deleted file mode 100644 index 72939605..00000000 --- a/assets/css/routes/special.css +++ /dev/null @@ -1,237 +0,0 @@ -/** - * AKSRT Special Page — 专题聚合页样式 - * - * @package AKSRT - */ - -.special-page { - max-width: var(--container); - margin: 0 auto; - padding: 0 var(--space-4); -} - -/* Cover section */ -.special-cover { - position: relative; - width: 100%; - height: 320px; - border-radius: var(--radius-xl); - overflow: hidden; - margin-bottom: var(--space-8); - background: var(--surface-2); -} - -.special-cover__image { - width: 100%; - height: 100%; - object-fit: cover; -} - -.special-cover__overlay { - position: absolute; - inset: 0; - background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent); - display: flex; - align-items: flex-end; - padding: var(--space-8); -} - -.special-cover__title { - font-size: var(--text-3xl); - font-weight: 700; - color: #fff; - margin: 0 0 var(--space-2); -} - -.special-cover__summary { - font-size: var(--text-base); - color: rgba(255, 255, 255, 0.85); - margin: 0; - max-width: 600px; - line-height: var(--leading-normal); -} - -/* Content layout */ -.special-content { - display: grid; - grid-template-columns: 1fr 311px; - gap: var(--space-8); - align-items: start; -} - -.special-content--no-sidebar { - grid-template-columns: 1fr; -} - -/* Subpage cards */ -.special-cards { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); - gap: var(--space-4); -} - -.special-card { - background: var(--surface-1); - border: 1px solid var(--color-line); - border-radius: var(--radius-lg); - overflow: hidden; - transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); -} - -.special-card:hover { - box-shadow: none; - transform: none; -} - -.special-card__thumbnail { - width: 100%; - height: 180px; - object-fit: cover; - background: var(--surface-2); -} - -.special-card__body { - padding: var(--card-padding); -} - -.special-card__title { - font-size: var(--text-lg); - font-weight: 600; - color: var(--color-ink); - margin: 0 0 var(--space-2); - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; -} - -.special-card__excerpt { - font-size: var(--text-sm); - color: var(--color-ink-3); - margin: 0; - line-height: var(--leading-normal); - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -.special-card__meta { - display: flex; - align-items: center; - gap: var(--space-3); - margin-top: var(--space-3); - font-size: var(--text-xs); - color: var(--color-ink-4); -} - -/* List layout */ -.special-list { - display: flex; - flex-direction: column; - gap: var(--space-4); -} - -.special-list-item { - display: flex; - gap: var(--space-4); - padding: var(--card-padding); - background: var(--surface-1); - border: 1px solid var(--color-line); - border-radius: var(--radius-lg); - transition: box-shadow var(--dur) var(--ease); -} - -.special-list-item:hover { - box-shadow: var(--shadow); -} - -.special-list-item__thumbnail { - width: 200px; - height: 130px; - object-fit: cover; - border-radius: var(--radius); - flex-shrink: 0; - background: var(--surface-2); -} - -.special-list-item__body { - flex: 1; - min-width: 0; -} - -.special-list-item__title { - font-size: var(--text-lg); - font-weight: 600; - color: var(--color-ink); - margin: 0 0 var(--space-2); -} - -.special-list-item__excerpt { - font-size: var(--text-sm); - color: var(--color-ink-3); - margin: 0; - line-height: var(--leading-normal); - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Sidebar */ -.special-sidebar { - position: sticky; - top: calc(var(--nav-height) + var(--space-4)); -} - -.special-sidebar__section { - background: var(--surface-1); - border: 1px solid var(--color-line); - border-radius: var(--radius-lg); - padding: var(--card-padding); - margin-bottom: var(--space-4); -} - -.special-sidebar__title { - font-size: var(--text-base); - font-weight: 600; - color: var(--color-ink); - margin: 0 0 var(--space-3); - padding-bottom: var(--space-3); - border-bottom: 1px solid var(--color-line-soft); -} - -/* Responsive */ -@media (max-width: 991px) { - .special-content { - grid-template-columns: 1fr; - } - - .special-sidebar { - position: static; - } - - .special-cover { - height: 220px; - border-radius: var(--radius-lg); - } - - .special-cover__title { - font-size: var(--text-2xl); - } -} - -@media (max-width: 640px) { - .special-cards { - grid-template-columns: 1fr; - } - - .special-list-item { - flex-direction: column; - } - - .special-list-item__thumbnail { - width: 100%; - height: 180px; - } -} diff --git a/assets/css/routes/user-home.css b/assets/css/routes/user-home.css index 2735a088..3a458384 100644 --- a/assets/css/routes/user-home.css +++ b/assets/css/routes/user-home.css @@ -445,8 +445,8 @@ } } -/* User-home forum tab (owned by public user home route) */ -.aksrt-user-home .uh-forum__subtabs { +/* User-home follow tab */ +.aksrt-user-home .uh-follow__subtabs { display: flex; gap: 4px; margin-bottom: 16px; @@ -454,7 +454,7 @@ border-bottom: 1px solid var(--c-border, #e8e8e8); } -.aksrt-user-home .uh-forum__subtab { +.aksrt-user-home .uh-follow__subtab { display: inline-flex; align-items: center; gap: 4px; @@ -466,109 +466,22 @@ transition: all .2s; } -.aksrt-user-home .uh-forum__subtab:hover { +.aksrt-user-home .uh-follow__subtab:hover { color: var(--c-text-1, #333); background: var(--c-fill-1, #f5f5f5); } -.aksrt-user-home .uh-forum__subtab.is-active { +.aksrt-user-home .uh-follow__subtab.is-active { background: var(--c-primary, #1890ff); color: #fff; } -.aksrt-user-home .uh-forum__subtab-count { +.aksrt-user-home .uh-follow__subtab-count { font-size: 11px; opacity: .7; } -.aksrt-user-home .uh-forum__list { - display: flex; - flex-direction: column; -} - -.aksrt-user-home .uh-forum__item { - padding: 12px 0; - border-bottom: 1px solid var(--c-border-light, #f5f5f5); -} - -.aksrt-user-home .uh-forum__item:last-child { - border-bottom: none; -} - -.aksrt-user-home .uh-forum__item-title { - display: block; - font-size: 15px; - font-weight: 500; - color: var(--c-text-1, #333); - text-decoration: none; - margin-bottom: 4px; -} - -.aksrt-user-home .uh-forum__item-title:hover { - color: var(--c-primary, #1890ff); -} - -.aksrt-user-home .uh-forum__item-meta { - display: flex; - gap: 12px; - font-size: 12px; - color: var(--c-text-3, #999); -} - -.aksrt-user-home .uh-forum__item-meta i { - margin-right: 3px; -} - -.aksrt-user-home .uh-forum__section-title { - font-size: 14px; - font-weight: 600; - color: var(--c-text-2, #666); - margin: 16px 0 10px; - padding-bottom: 6px; - border-bottom: 1px solid var(--c-border-light, #f5f5f5); -} - -.aksrt-user-home .uh-forum__section-title i { - margin-right: 4px; - font-size: 13px; -} - -.aksrt-user-home .uh-forum__plate-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); - gap: 10px; - margin-bottom: 16px; -} - -.aksrt-user-home .uh-forum__plate-card { - display: block; - padding: 12px; - border: 1px solid var(--c-border, #e8e8e8); - border-radius: var(--radius, 6px); - text-decoration: none; - transition: border-color .2s, box-shadow .2s; -} - -.aksrt-user-home .uh-forum__plate-card:hover { - border-color: var(--c-primary, #1890ff); - box-shadow: 0 2px 8px rgba(0, 0, 0, .06); -} - -.aksrt-user-home .uh-forum__plate-name { - font-size: 14px; - font-weight: 600; - color: var(--c-text-1, #333); - margin-bottom: 6px; -} - -.aksrt-user-home .uh-forum__plate-stats { - display: flex; - gap: 10px; - font-size: 12px; - color: var(--c-text-3, #999); -} - -.aksrt-user-home .uh-forum__pagination { +.aksrt-user-home .uh-follow__pagination { margin-top: 16px; text-align: center; } diff --git a/assets/js/widget-set.js b/assets/js/widget-set.js index ce598c44..71bcb5b6 100644 --- a/assets/js/widget-set.js +++ b/assets/js/widget-set.js @@ -42,7 +42,6 @@ tab_count: tabCount, style: style, paginate: paginate, - topics: tab.getAttribute('data-topics') || '', limit_day: tab.getAttribute('data-limit-day') || '0', pay_type: tab.getAttribute('data-pay-type') || '', }); diff --git a/inc/bootstrap.php b/inc/bootstrap.php index 0d158426..2bdfcc5c 100644 --- a/inc/bootstrap.php +++ b/inc/bootstrap.php @@ -17,7 +17,7 @@ require_once AKSRT_DIR . '/inc/helpers/aksrt-avatar.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-domain-model.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-template-tags.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-frontend-tags.php'; -// Comment kernel (shared by post / forum / shop surfaces). +// Shared comment kernel. require_once AKSRT_DIR . '/inc/helpers/aksrt-ip-geo.php'; require_once AKSRT_DIR . '/inc/helpers/comments/content.php'; require_once AKSRT_DIR . '/inc/helpers/comments/actions.php'; @@ -37,7 +37,7 @@ require_once AKSRT_DIR . '/inc/helpers/aksrt-single-aside.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-archive.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-archive-filters.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-comments.php'; -require_once AKSRT_DIR . '/inc/helpers/aksrt-forum.php'; +require_once AKSRT_DIR . '/inc/helpers/aksrt-page-template.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-slider.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-vip.php'; require_once AKSRT_DIR . '/inc/helpers/aksrt-auth-ui.php'; diff --git a/inc/core-hooks/part-1.php b/inc/core-hooks/part-1.php index bf60c7c4..f79eac54 100644 --- a/inc/core-hooks/part-1.php +++ b/inc/core-hooks/part-1.php @@ -1,83 +1,60 @@ - array( - 'name' => __('Banners', 'aksrt'), - 'singular_name' => __('Banner', 'aksrt'), - ), - 'public' => false, - 'show_ui' => false, - 'show_in_rest' => true, - 'supports' => array('title'), - 'menu_icon' => 'dashicons-images-alt2', - 'capability_type' => 'post', - 'capabilities' => array('create_posts' => 'manage_options'), - 'map_meta_cap' => true, - )); -} -add_action('init', 'aksrt_register_banner_cpt'); - -// ============================================================ -// §3.7 Register Topics taxonomy for posts (专题分类) -// ============================================================ -function aksrt_register_topics_taxonomy() { - register_taxonomy('topics', 'post', [ - 'labels' => [ - 'name' => __('专题', 'aksrt'), - 'singular_name' => __('专题', 'aksrt'), - 'search_items' => __('搜索专题', 'aksrt'), - 'all_items' => __('所有专题', 'aksrt'), - 'edit_item' => __('编辑专题', 'aksrt'), - 'add_new_item' => __('添加专题', 'aksrt'), - 'menu_name' => __('专题', 'aksrt'), - ], - 'hierarchical' => true, - 'public' => true, - 'show_in_rest' => true, - 'show_admin_column' => true, - 'rewrite' => ['slug' => 'topics'], - ]); -} -add_action('init', 'aksrt_register_topics_taxonomy'); - -// ============================================================ \ No newline at end of file + array( + 'name' => __('Banners', 'aksrt'), + 'singular_name' => __('Banner', 'aksrt'), + ), + 'public' => false, + 'show_ui' => false, + 'show_in_rest' => true, + 'supports' => array('title'), + 'menu_icon' => 'dashicons-images-alt2', + 'capability_type' => 'post', + 'capabilities' => array('create_posts' => 'manage_options'), + 'map_meta_cap' => true, + )); +} +add_action('init', 'aksrt_register_banner_cpt'); + +// ============================================================ diff --git a/inc/helpers/aksrt-archive.php b/inc/helpers/aksrt-archive.php index 61a341fc..fc2da9ec 100644 --- a/inc/helpers/aksrt-archive.php +++ b/inc/helpers/aksrt-archive.php @@ -31,7 +31,6 @@ if (!function_exists('aksrt_archive_get_list_style_settings')) : 'card_cat_ids' => is_array($settings['card_cat_ids'] ?? null) ? array_map('intval', $settings['card_cat_ids']) : [], 'card_home' => !empty($settings['card_home']), 'card_tag' => !empty($settings['card_tag']), - 'card_topics' => !empty($settings['card_topics']), 'card_author' => !empty($settings['card_author']), 'list_show_type' => (string) ($settings['list_show_type'] ?? 'separate'), 'list_img_position'=> (string) ($settings['list_img_position'] ?? 'left'), @@ -55,10 +54,10 @@ if (!function_exists('aksrt_resolve_post_list_render_config')) : * Decision order mirrors zib_mian_posts_while(): * 1) explicit override mode/type * 2) global list_type (post_card_style): only "card" is card grid; thumb/text/thumb_if_has are list - * 3) surface card switches (home/tag/topics/author/cat IDs) + * 3) surface card switches (home/tag/author/cat IDs) * * @param array $args { - * @type string $context home|category|tag|topics|author|search|archive + * @type string $context home|category|tag|author|search|archive * @type int $term_id Optional term id for list_card_cat * @type array $overrides Optional renderer overrides (mode, style, …) * } @@ -84,8 +83,6 @@ if (!function_exists('aksrt_resolve_post_list_render_config')) : $context = 'category'; } elseif (is_tag()) { $context = 'tag'; - } elseif (is_tax('topics')) { - $context = 'topics'; } elseif (is_author()) { $context = 'author'; } elseif (is_search()) { @@ -126,8 +123,6 @@ if (!function_exists('aksrt_resolve_post_list_render_config')) : $mode = 'card'; } elseif ($context === 'tag' && !empty($list['card_tag'])) { $mode = 'card'; - } elseif ($context === 'topics' && !empty($list['card_topics'])) { - $mode = 'card'; } elseif ($context === 'author' && !empty($list['card_author'])) { $mode = 'card'; } elseif ($term_id > 0 && !empty($list['card_cat_ids']) && in_array($term_id, array_map('intval', (array) $list['card_cat_ids']), true)) { @@ -191,7 +186,7 @@ if (!function_exists('aksrt_resolve_post_list_render_config')) : $config['multi_thumb_limit'] = (int) ($thumb_settings['multi_count'] ?? 4); $config['multi_thumb_min'] = 3; } - if (($context === 'category' || $context === 'topics') && !empty($thumb_settings['mult_thumb_cat_ids']) && $term_id > 0) { + if ($context === 'category' && !empty($thumb_settings['mult_thumb_cat_ids']) && $term_id > 0) { if (in_array($term_id, array_map('intval', (array) $thumb_settings['mult_thumb_cat_ids']), true)) { $config['multi_thumb_enabled'] = true; $config['multi_thumb_limit'] = (int) ($thumb_settings['multi_count'] ?? 4); diff --git a/inc/helpers/aksrt-coupon-order.php b/inc/helpers/aksrt-coupon-order.php index d375cd25..58d787d1 100644 --- a/inc/helpers/aksrt-coupon-order.php +++ b/inc/helpers/aksrt-coupon-order.php @@ -1,6 +1,6 @@ */ function aksrt_get_new_add_actions(array $types = ['post']): array { diff --git a/inc/helpers/aksrt-homepage.php b/inc/helpers/aksrt-homepage.php index 610dbd20..1b823cfa 100644 --- a/inc/helpers/aksrt-homepage.php +++ b/inc/helpers/aksrt-homepage.php @@ -87,7 +87,7 @@ if (!function_exists('aksrt_homepage_get_tab_terms')) { if (!$term || is_wp_error($term)) { continue; } - if (!in_array($term->taxonomy, ['category', 'topics'], true)) { + if ($term->taxonomy !== 'category') { continue; } diff --git a/inc/helpers/aksrt-forum.php b/inc/helpers/aksrt-page-template.php similarity index 100% rename from inc/helpers/aksrt-forum.php rename to inc/helpers/aksrt-page-template.php diff --git a/inc/helpers/aksrt-pay.php b/inc/helpers/aksrt-pay.php index 2fa192c7..967e097b 100644 --- a/inc/helpers/aksrt-pay.php +++ b/inc/helpers/aksrt-pay.php @@ -75,7 +75,7 @@ function aksrt_get_pay_types(): array { } /** - * Cash payment methods available for content/topic cashiers. + * Cash payment methods available for content cashiers. * * @return array */ diff --git a/inc/helpers/aksrt-posts-renderer.php b/inc/helpers/aksrt-posts-renderer.php index 26e6629f..271eaa51 100644 --- a/inc/helpers/aksrt-posts-renderer.php +++ b/inc/helpers/aksrt-posts-renderer.php @@ -592,13 +592,6 @@ if (!function_exists('aksrt_renderer_badges')) { } } - $topics = taxonomy_exists('topics') ? wp_get_post_terms((int) $data['post_id'], 'topics') : []; - if (!is_wp_error($topics) && !empty($topics)) { - foreach (array_slice($topics, 0, 2) as $topic) { - $items[] = ' ' . esc_html($topic->name) . ''; - } - } - if (!empty($data['is_resource'])) { $items[] = 'VIP'; } diff --git a/inc/helpers/aksrt-single-components.php b/inc/helpers/aksrt-single-components.php index d666e8fc..66d27e63 100644 --- a/inc/helpers/aksrt-single-components.php +++ b/inc/helpers/aksrt-single-components.php @@ -175,7 +175,7 @@ endif; if (!function_exists('aksrt_get_colored_term_tags')) : /** - * Colored but-links for terms (Zibll cat/topics palette). + * Colored but-links for terms. * * @param WP_Term[] $terms Terms. * @param string $class Base class. @@ -207,22 +207,9 @@ endif; if (!function_exists('aksrt_get_single_article_tags_html')) : /** - * topics → categories → tags (Zibll footer order). + * Categories → tags. */ function aksrt_get_single_article_tags_html(int $post_id): string { - $topics_html = ''; - if (taxonomy_exists('topics')) { - $topics = wp_get_post_terms($post_id, 'topics'); - if (!is_wp_error($topics) && !empty($topics)) { - $topics_html = aksrt_get_colored_term_tags( - array_slice($topics, 0, 6), - 'but ml6 radius', - ' ', - ['c-yellow', 'c-green', 'c-purple', 'c-red', 'c-blue'] - ); - } - } - $cats = get_the_category($post_id) ?: []; $cat_html = aksrt_get_colored_term_tags( $cats, @@ -246,7 +233,7 @@ if (!function_exists('aksrt_get_single_article_tags_html')) : } } - $top = $topics_html . $cat_html; + $top = $cat_html; if ($top === '' && $tags_html === '') { return ''; } diff --git a/inc/helpers/aksrt-single-render.php b/inc/helpers/aksrt-single-render.php index 438bedcc..385aef73 100644 --- a/inc/helpers/aksrt-single-render.php +++ b/inc/helpers/aksrt-single-render.php @@ -605,7 +605,7 @@ if (!function_exists('aksrt_single_related_query_args')) : ]; } } else { - // category (default): OR across category + tags + topics like Zibll. + // category (default): OR across category + tags. $cat_ids = wp_get_post_terms($post_id, 'category', ['fields' => 'ids']); if (!empty($cat_ids) && !is_wp_error($cat_ids)) { $tax_query[] = [ @@ -622,16 +622,6 @@ if (!function_exists('aksrt_single_related_query_args')) : 'terms' => array_map('intval', $tag_ids), ]; } - if (taxonomy_exists('topics')) { - $topic_ids = wp_get_post_terms($post_id, 'topics', ['fields' => 'ids']); - if (!empty($topic_ids) && !is_wp_error($topic_ids)) { - $tax_query[] = [ - 'taxonomy' => 'topics', - 'field' => 'term_id', - 'terms' => array_map('intval', $topic_ids), - ]; - } - } } if (count($tax_query) > 1) { diff --git a/inc/helpers/aksrt-template-tags.php b/inc/helpers/aksrt-template-tags.php index e8849a2b..44df4add 100644 --- a/inc/helpers/aksrt-template-tags.php +++ b/inc/helpers/aksrt-template-tags.php @@ -1424,7 +1424,7 @@ if (!function_exists('aksrt_user_can')) : * * @param string $cap Capability id (e.g. 'new_post_add', 'comment_edit'). * @param int $user_id User ID. Defaults to current user. - * @param int|null $context Optional plate/post context for moderator-scoped caps. + * @param int|null $context Optional content context for scoped capabilities. * @return bool */ function aksrt_user_can(string $cap, int $user_id = 0, ?int $context = null): bool { diff --git a/inc/helpers/homepage/content.php b/inc/helpers/homepage/content.php index b197a710..e5a2f459 100644 --- a/inc/helpers/homepage/content.php +++ b/inc/helpers/homepage/content.php @@ -63,7 +63,7 @@ if (!function_exists('aksrt_homepage_get_tab_query')) { $term = get_term($term_id); $taxonomy = ($term && !is_wp_error($term)) ? (string) $term->taxonomy : 'category'; - if (!in_array($taxonomy, ['category', 'topics'], true)) { + if ($taxonomy !== 'category') { $taxonomy = 'category'; } diff --git a/inc/helpers/homepage/header-components.php b/inc/helpers/homepage/header-components.php index e9db142c..749929e3 100644 --- a/inc/helpers/homepage/header-components.php +++ b/inc/helpers/homepage/header-components.php @@ -16,7 +16,6 @@ if (!function_exists('aksrt_header_components_page_type_keys')) { function aksrt_header_components_page_type_keys(): array { return [ 'home', - 'topics', 'category', 'tag', 'author', @@ -68,11 +67,6 @@ if (!function_exists('aksrt_header_slide_match_page_type')) { $post_type = (string) $raw_post_type; } - // Special keys that are not plain is_{$type} flags. - if ($type === 'topics') { - return is_tax('topics'); - } - // Generic WP_Query is_* flags (home/category/tag/author/single/search/page). $query_flag = 'is_' . $type; if (empty($wp_query->{$query_flag})) { diff --git a/src/Admin/ExtensionController.php b/src/Admin/ExtensionController.php index 1b8a6ec2..243ad740 100644 --- a/src/Admin/ExtensionController.php +++ b/src/Admin/ExtensionController.php @@ -92,7 +92,6 @@ class ExtensionController extends ControllerBase { 'data' => [ 'total' => 0, 'nav_count' => 0, - 'special_count' => 0, ], ]); } diff --git a/src/Admin/GlobalController.php b/src/Admin/GlobalController.php index a235736f..a1b1d9b5 100644 --- a/src/Admin/GlobalController.php +++ b/src/Admin/GlobalController.php @@ -258,7 +258,7 @@ class GlobalController extends ControllerBase { if ($term_id > 0) { $term = get_term($term_id); $taxonomy = ($term && !is_wp_error($term)) ? (string) $term->taxonomy : 'category'; - if (!in_array($taxonomy, ['category', 'topics'], true)) { + if ($taxonomy !== 'category') { $taxonomy = 'category'; } $args['tax_query'] = [[ @@ -350,28 +350,6 @@ class GlobalController extends ControllerBase { ]; } - if (taxonomy_exists('topics')) { - $topics = get_terms([ - 'taxonomy' => 'topics', - 'hide_empty' => false, - 'orderby' => 'name', - 'order' => 'ASC', - ]); - if (!is_wp_error($topics)) { - foreach ($topics as $term) { - $data[] = [ - 'id' => (int) $term->term_id, - 'term_id' => (int) $term->term_id, - 'name' => $term->name, - 'slug' => $term->slug, - 'count' => (int) $term->count, - 'parent' => (int) $term->parent, - 'taxonomy' => 'topics', - ]; - } - } - } - return $this->success(['data' => $data]); } diff --git a/src/Admin/HomepageSettingsRest.php b/src/Admin/HomepageSettingsRest.php index 4c8f67b2..2d84b185 100644 --- a/src/Admin/HomepageSettingsRest.php +++ b/src/Admin/HomepageSettingsRest.php @@ -216,11 +216,8 @@ trait HomepageSettingsRest { continue; } $taxonomy = (string) $term->taxonomy; - if (!in_array($taxonomy, ['category', 'topics'], true)) { - // Allow category always; topics if registered. - if ($taxonomy !== 'category') { - continue; - } + if ($taxonomy !== 'category') { + continue; } $orderby = sanitize_key((string) ($tab['orderby'] ?? '')); if ($orderby !== '' && !in_array($orderby, $allowed_sorts, true)) { diff --git a/src/Admin/Schema/GlobalSchema.php b/src/Admin/Schema/GlobalSchema.php index ebc93c2b..98d0b8c6 100644 --- a/src/Admin/Schema/GlobalSchema.php +++ b/src/Admin/Schema/GlobalSchema.php @@ -344,14 +344,12 @@ class GlobalSchema { ['key' => 'search_type_category', 'label' => '分类', 'type' => 'switch', 'default' => true], ['key' => 'search_type_tag', 'label' => '标签', 'type' => 'switch', 'default' => true], ['key' => 'search_type_product', 'label' => '商品', 'type' => 'switch', 'default' => false], - ['key' => 'search_type_topic', 'label' => '帖子', 'type' => 'switch', 'default' => false], ['key' => 'search_default_type', 'label' => '默认类型', 'type' => 'select', 'default' => 'post', 'options' => [ ['label' => '文章', 'value' => 'post'], ['label' => '用户', 'value' => 'user'], ['label' => '分类', 'value' => 'category'], ['label' => '标签', 'value' => 'tag'], ['label' => '商品', 'value' => 'product'], - ['label' => '帖子', 'value' => 'topic'], ]], ]], ['key' => 'features', 'title' => '搜索功能', 'fields' => [ diff --git a/src/Admin/Schema/PostList/SchemaPostListList.php b/src/Admin/Schema/PostList/SchemaPostListList.php index 5ec42608..dd84b2c1 100644 --- a/src/Admin/Schema/PostList/SchemaPostListList.php +++ b/src/Admin/Schema/PostList/SchemaPostListList.php @@ -41,7 +41,6 @@ class SchemaPostListList { ['label' => '首页', 'value' => 'home'], ['label' => '分类页', 'value' => 'cat'], ['label' => '标签页', 'value' => 'tag'], - ['label' => '专题页', 'value' => 'topics'], ], ], ], @@ -91,11 +90,10 @@ class SchemaPostListList { 'key' => 'list_badge_show', 'label' => '列表徽章', 'type' => 'checkbox', - 'default' => ['pay', 'tag', 'topics', 'cat'], + 'default' => ['pay', 'tag', 'cat'], 'options' => [ ['label' => '付费', 'value' => 'pay'], ['label' => '分类', 'value' => 'cat'], - ['label' => '专题', 'value' => 'topics'], ['label' => '标签', 'value' => 'tag'], ], ], @@ -261,12 +259,6 @@ class SchemaPostListList { 'type' => 'switch', 'default' => false, ], - [ - 'key' => 'list_card_topics', - 'label' => '专题页卡片模式', - 'type' => 'switch', - 'default' => false, - ], [ 'key' => 'list_card_author', 'label' => '用户页卡片模式', diff --git a/src/Admin/Schema/SchemaPageDisplay.php b/src/Admin/Schema/SchemaPageDisplay.php index b321f17a..def1d457 100644 --- a/src/Admin/Schema/SchemaPageDisplay.php +++ b/src/Admin/Schema/SchemaPageDisplay.php @@ -60,15 +60,9 @@ class SchemaPageDisplay { ]], ['key' => 'header_newposts_types', 'label' => '发布类型', 'type' => 'checkbox', 'default' => ['post'], 'options' => [ ['label' => '文章', 'value' => 'post'], - ['label' => '帖子', 'value' => 'topic'], - ['label' => '商品', 'value' => 'product'], - ['label' => '版块', 'value' => 'plate'], ]], ['key' => 'header_user_newposts_btn', 'label' => '用户卡发布类型', 'type' => 'select', 'default' => 'post', 'options' => [ ['label' => '文章', 'value' => 'post'], - ['label' => '帖子', 'value' => 'topic'], - ['label' => '商品', 'value' => 'product'], - ['label' => '版块', 'value' => 'plate'], ]], ['key' => 'header_user_newposts_text', 'label' => '用户卡发布文案', 'type' => 'input', 'default' => '发布内容'], ]], @@ -92,7 +86,6 @@ class SchemaPageDisplay { ['key' => 'header_components_cards_enabled', 'label' => '启用图标卡片', 'type' => 'switch', 'default' => false], ['key' => 'header_components_show_on', 'label' => '按页面类型启用', 'type' => 'checkbox', 'default' => ['home'], 'options' => [ ['label' => '首页', 'value' => 'home'], - ['label' => '专题页', 'value' => 'topics'], ['label' => '分类页', 'value' => 'category'], ['label' => '标签页', 'value' => 'tag'], ['label' => '用户页', 'value' => 'author'], @@ -302,63 +295,6 @@ class SchemaPageDisplay { ]], ], ], - 'special' => [ - 'key' => 'special', - 'title' => '专题页面', - 'version' => '1.0.0', - 'option_key' => 'aksrt_settings', - 'groups' => [ - ['key' => 'header', 'title' => '专题头部', 'fields' => [ - ['key' => 'special_cover_enabled', 'label' => '显示专题封面', 'type' => 'switch', 'default' => true], - ['key' => 'special_summary_enabled', 'label' => '显示专题摘要', 'type' => 'switch', 'default' => true], - ['key' => 'special_summary_length', 'label' => '摘要最大长度', 'type' => 'number', 'default' => 200, 'min' => 50, 'max' => 500], - ['key' => 'special_default_cover', 'label' => '默认封面图', 'type' => 'media', 'default' => ''], - ]], - ['key' => 'layout', 'title' => '布局设置', 'fields' => [ - ['key' => 'special_layout', 'label' => '内容布局', 'type' => 'radio', 'default' => 'grid', 'options' => [ - ['label' => '网格', 'value' => 'grid'], - ['label' => '列表', 'value' => 'list'], - ['label' => '瀑布流', 'value' => 'masonry'], - ]], - ['key' => 'special_columns', 'label' => '网格列数', 'type' => 'number', 'default' => 2, 'min' => 1, 'max' => 4], - ['key' => 'special_sidebar', 'label' => '侧边栏', 'type' => 'switch', 'default' => true], - ['key' => 'special_post_count', 'label' => '显示文章数', 'type' => 'switch', 'default' => false], - ]], - ['key' => 'aggregation', 'title' => '聚合规则', 'fields' => [ - ['key' => 'special_source_type', 'label' => '内容来源', 'type' => 'radio', 'default' => 'category', 'options' => [ - ['label' => '分类', 'value' => 'category'], - ['label' => '标签', 'value' => 'tag'], - ['label' => '手动选择', 'value' => 'manual'], - ['label' => '最新文章', 'value' => 'latest'], - ]], - ['key' => 'special_source_ids', 'label' => '来源 ID 列表', 'type' => 'input', 'default' => ''], - ]], - ['key' => 'subpage', 'title' => '子页面展示', 'fields' => [ - ['key' => 'special_subpage_display', 'label' => '子页面样式', 'type' => 'radio', 'default' => 'cards', 'options' => [ - ['label' => '卡片', 'value' => 'cards'], - ['label' => '列表', 'value' => 'list'], - ['label' => '时间线', 'value' => 'timeline'], - ]], - ['key' => 'special_subpage_count', 'label' => '每页子页面数', 'type' => 'number', 'default' => 6, 'min' => 1, 'max' => 24], - ]], - ['key' => 'pagination', 'title' => '分页设置', 'fields' => [ - ['key' => 'special_pagination', 'label' => '分页模式', 'type' => 'radio', 'default' => 'numeric', 'options' => [ - ['label' => '数字分页', 'value' => 'numeric'], - ['label' => '加载更多', 'value' => 'load_more'], - ['label' => '无限滚动', 'value' => 'infinite'], - ]], - ['key' => 'special_per_page', 'label' => '每页文章数', 'type' => 'number', 'default' => 12, 'min' => 4, 'max' => 48], - ]], - ['key' => 'orderby', 'title' => '排序设置', 'fields' => [ - ['key' => 'special_orderby', 'label' => '默认排序', 'type' => 'select', 'default' => 'date', 'options' => [ - ['label' => '发布时间', 'value' => 'date'], - ['label' => '最近更新', 'value' => 'modified'], - ['label' => '浏览数', 'value' => 'views'], - ['label' => '评论数', 'value' => 'comments'], - ]], - ]], - ], - ], 'background' => [ 'key' => 'background', 'title' => '全局背景', diff --git a/src/Admin/Schema/SchemaPostList.php b/src/Admin/Schema/SchemaPostList.php index 0be92aa9..0134fe28 100644 --- a/src/Admin/Schema/SchemaPostList.php +++ b/src/Admin/Schema/SchemaPostList.php @@ -112,7 +112,7 @@ class SchemaPostList { ['label' => '纯文字', 'value' => 'text'], ], 'description' => '对齐 Zibll 相关文章三种样式'], ['key' => 'post_related_source', 'label' => '推荐来源', 'type' => 'radio', 'default' => 'category', 'options' => [ - ['label' => '同分类/标签/专题', 'value' => 'category'], + ['label' => '同分类/标签', 'value' => 'category'], ['label' => '同标签', 'value' => 'tag'], ['label' => '随机', 'value' => 'random'], ]], @@ -179,7 +179,6 @@ class SchemaPostList { ['key' => 'custom_filter_show', 'label' => '筛选显示页面', 'type' => 'checkbox', 'default' => ['cat', 'tag'], 'options' => [ ['label' => '分类页', 'value' => 'cat'], ['label' => '标签页', 'value' => 'tag'], - ['label' => '专题页', 'value' => 'topics'], ], 'help' => '选择在哪些页面显示筛选栏'], ['key' => 'filter_categories', 'label' => '分类筛选', 'type' => 'switch', 'default' => true], ['key' => 'filter_tags', 'label' => '标签筛选', 'type' => 'switch', 'default' => false], @@ -191,8 +190,6 @@ class SchemaPostList { ['key' => 'filter_cat_show_tag', 'label' => '分类页:显示标签筛选', 'type' => 'switch', 'default' => false, 'dependsOn' => ['key' => 'filter_enabled', 'value' => true]], ['key' => 'filter_tag_show_cat', 'label' => '标签页:显示分类筛选', 'type' => 'switch', 'default' => true, 'dependsOn' => ['key' => 'filter_enabled', 'value' => true]], ['key' => 'filter_tag_show_tag', 'label' => '标签页:显示标签筛选', 'type' => 'switch', 'default' => false, 'dependsOn' => ['key' => 'filter_enabled', 'value' => true]], - ['key' => 'filter_topics_show_cat', 'label' => '专题页:显示分类筛选', 'type' => 'switch', 'default' => true, 'dependsOn' => ['key' => 'filter_enabled', 'value' => true]], - ['key' => 'filter_topics_show_tag', 'label' => '专题页:显示标签筛选', 'type' => 'switch', 'default' => false, 'dependsOn' => ['key' => 'filter_enabled', 'value' => true]], ]], ['key' => 'custom_filter', 'title' => '自定义筛选维度', 'fields' => [ ['key' => 'custom_filter', 'label' => '筛选维度定义', 'type' => 'repeater', 'default' => [], 'dependsOn' => ['key' => 'filter_enabled', 'value' => true], 'help' => '每项定义一个筛选维度(如"类型""地区""年份"),及其可选值列表', 'fields' => [ @@ -209,7 +206,6 @@ class SchemaPostList { ['key' => 'cats', 'label' => '绑定分类', 'type' => 'taxonomy_select', 'taxonomy' => 'category', 'multiple' => true, 'default' => []], ['key' => 'cat_s', 'label' => '显示分类筛选', 'type' => 'switch', 'default' => false], ['key' => 'tag_s', 'label' => '显示标签筛选', 'type' => 'switch', 'default' => false], - ['key' => 'topics_s', 'label' => '显示专题筛选', 'type' => 'switch', 'default' => false], ['key' => 'orderby_s', 'label' => '显示排序按钮', 'type' => 'switch', 'default' => true], ['key' => 'custom_filters', 'label' => '启用的自定义维度', 'type' => 'input', 'default' => '', 'help' => '逗号分隔维度标识,留空使用全部'], ]], @@ -355,7 +351,6 @@ class SchemaPostList { ['key' => 'front_submit_guest_enabled', 'label' => '允许免登录投稿', 'type' => 'switch', 'default' => false, 'help' => '开启后访客可投稿;文章归属到下方用户'], ['key' => 'post_article_user', 'label' => '免登录归属用户', 'type' => 'user_select', 'default' => 0, 'help' => '免登录投稿时文章归属的用户,搜索选择'], ['key' => 'front_submit_tags', 'label' => '标签输入', 'type' => 'switch', 'default' => true], - ['key' => 'post_article_topics_s', 'label' => '专题选择', 'type' => 'switch', 'default' => false, 'help' => '投稿时可选择专题分类'], ['key' => 'post_article_custom_filter_s', 'label' => '高级筛选选择', 'type' => 'switch', 'default' => true, 'help' => '投稿时可选择自定义筛选维度值'], ['key' => 'front_submit_custom_fields', 'label' => '自定义字段', 'type' => 'textarea', 'default' => ''], ]], diff --git a/src/Content/PayOrders.php b/src/Content/PayOrders.php index 06ed8f2d..913a2008 100644 --- a/src/Content/PayOrders.php +++ b/src/Content/PayOrders.php @@ -26,7 +26,7 @@ trait PayOrders { if ($post_id <= 0) { return; } - // Only count normal posts (content pay), not necessarily forum topics. + // Only count normal posts for content purchases. $post = get_post($post_id); if (!($post instanceof \WP_Post) || $post->post_type !== 'post') { return; diff --git a/src/Core/FrontSubmit.php b/src/Core/FrontSubmit.php index cec7ffdd..9dbe110a 100644 --- a/src/Core/FrontSubmit.php +++ b/src/Core/FrontSubmit.php @@ -171,7 +171,6 @@ class FrontSubmit { 'allow_category' => true, 'allow_tags' => true, 'allow_cover' => true, - 'topics_s' => false, 'custom_filter_s' => true, 'review_mode' => 'pending', 'pay_free_s' => true, diff --git a/src/Core/FrontSubmitSave.php b/src/Core/FrontSubmitSave.php index c0262324..31098434 100644 --- a/src/Core/FrontSubmitSave.php +++ b/src/Core/FrontSubmitSave.php @@ -170,7 +170,7 @@ trait FrontSubmitSave { wp_set_post_tags((int) $in_id, []); } - $this->apply_topics_and_filters((int) $in_id, $data, $settings); + $this->apply_custom_filters((int) $in_id, $data, $settings); $pay_result = $this->save_pay_meta((int) $in_id, $data, $user_id, $settings); if (!$pay_result['success']) { @@ -275,16 +275,7 @@ trait FrontSubmitSave { * @param array $data * @param array $settings */ - private function apply_topics_and_filters(int $post_id, array $data, array $settings): void { - if (!empty($settings['topics_s']) && taxonomy_exists('topics')) { - $topics = $data['topics'] ?? []; - if (!is_array($topics)) { - $topics = $topics === '' || $topics === null ? [] : [$topics]; - } - $topic_ids = array_values(array_filter(array_map('absint', $topics))); - wp_set_object_terms($post_id, $topic_ids, 'topics'); - } - + private function apply_custom_filters(int $post_id, array $data, array $settings): void { if (empty($settings['custom_filter_s'])) { return; } diff --git a/src/Core/ScriptsPart1c.php b/src/Core/ScriptsPart1c.php index 51e2833f..a18699f7 100644 --- a/src/Core/ScriptsPart1c.php +++ b/src/Core/ScriptsPart1c.php @@ -572,7 +572,7 @@ trait ScriptsPart1c { 'stickyEnabled' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_post_list_style_settings()['sticky_enabled'] : true, 'stickyPages' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_post_list_style_settings()['sticky_pages'] : ['home', 'cat'], 'badgeShow' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_post_list_style_settings()['badge_show'] : true, - 'badgeTypes' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_post_list_style_settings()['badge_types'] : ['pay', 'tag', 'topics', 'cat'], + 'badgeTypes' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_post_list_style_settings()['badge_types'] : ['pay', 'tag', 'cat'], 'search' => [ 'mode' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::search_mode() : 'default', 'placeholder' => function_exists('aksrt_get_search_placeholder') ? aksrt_get_search_placeholder() : __('开启精彩搜索...', 'aksrt'), diff --git a/src/Core/Shortcodes.php b/src/Core/Shortcodes.php index 1af9de7a..7172adfd 100644 --- a/src/Core/Shortcodes.php +++ b/src/Core/Shortcodes.php @@ -95,7 +95,7 @@ class Shortcodes { } /** - * [payshow]...[/payshow] — 付费后可见(文章 content-pay 或论坛主题解锁) + * [payshow]...[/payshow] — 文章付费后可见。 */ public function render_payshow(array $atts = [], string $content = ''): string { $atts = shortcode_atts(['message' => ''], $atts, 'payshow'); @@ -178,7 +178,7 @@ class Shortcodes { } /** - * Whether current viewer may see a paid hide block on this post/topic. + * Whether current viewer may see a paid hide block on this post. */ private function viewer_can_see_paid_block(int $pid): bool { if ($pid <= 0) { diff --git a/src/Core/WidgetAjax.php b/src/Core/WidgetAjax.php index 23788f96..1ddbf967 100644 --- a/src/Core/WidgetAjax.php +++ b/src/Core/WidgetAjax.php @@ -57,7 +57,6 @@ class WidgetAjax { 'order' => strtoupper(sanitize_key((string) ($request->get_param('order') ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC', 'cat' => max(0, (int) ($request->get_param('cat') ?? 0)), 'limit_day' => max(0, (int) ($request->get_param('limit_day') ?? 0)), - 'topics' => sanitize_text_field((string) ($request->get_param('topics') ?? '')), 'pay_type' => sanitize_key((string) ($request->get_param('pay_type') ?? '')), 'style' => sanitize_key((string) ($request->get_param('style') ?? 'list')), 'show_thumb' => $request->get_param('show_thumb') === null ? 1 : (int) $request->get_param('show_thumb'), @@ -90,8 +89,6 @@ class WidgetAjax { 'order' => strtoupper(sanitize_key((string) ($request->get_param('order') ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC', 'count' => max(0, min(20, (int) ($request->get_param('tab_count') ?? 0))), 'enabled' => true, - - 'topics' => sanitize_text_field((string) ($request->get_param('topics') ?? '')), 'limit_day' => max(0, (int) ($request->get_param('limit_day') ?? 0)), 'pay_type' => sanitize_key((string) ($request->get_param('pay_type') ?? '')),]; $opts = [ @@ -201,7 +198,6 @@ class WidgetAjax { 'order' => strtoupper(sanitize_key((string) ($request->get_param('order') ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC', 'cat' => max(0, (int) ($request->get_param('cat') ?? 0)), 'limit_day' => max(0, (int) ($request->get_param('limit_day') ?? 0)), - 'topics' => sanitize_text_field((string) ($request->get_param('topics') ?? '')), 'pay_type' => sanitize_key((string) ($request->get_param('pay_type') ?? '')), ]; $html = \AKSRT\Widgets\WidgetOnelinePosts::render_html($instance); diff --git a/src/Credits/Credits.php b/src/Credits/Credits.php index fe0dd25c..25ff7f79 100644 --- a/src/Credits/Credits.php +++ b/src/Credits/Credits.php @@ -22,7 +22,7 @@ class Credits { } /** - * Alias used by forum unlock/purchase paths. + * Backward-compatible alias for credit spending. */ public static function get_balance(int $user_id): int { return self::balance($user_id); diff --git a/src/Payment/PaymentOrchestrator.php b/src/Payment/PaymentOrchestrator.php index 9f0a4f8f..a67bef06 100644 --- a/src/Payment/PaymentOrchestrator.php +++ b/src/Payment/PaymentOrchestrator.php @@ -2,7 +2,7 @@ /** * Single execution path for "create a payment attempt for an existing order". * - * Every cashier (shop / content / VIP / forum / recharge / points) must route + * Every cashier (shop / content / VIP / recharge / points) must route * through here so that all of them get: * 1. a cross-request attempt lock (no double deduction on double-click) * 2. a fresh provider out_trade_no on re-pay (providers reject reused numbers) diff --git a/src/Payment/WeChatNotify.php b/src/Payment/WeChatNotify.php index f9bae25b..88019568 100644 --- a/src/Payment/WeChatNotify.php +++ b/src/Payment/WeChatNotify.php @@ -173,7 +173,7 @@ class WeChatNotify { if (empty($config['enabled'])) return; // 仅特定类型通知发送微信 - $allowed_types = ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply']; + $allowed_types = ['comment_reply', 'system_notice', 'order_paid', 'credits_change']; if (!in_array($type, $allowed_types, true)) return; $this->send($user_id, $type, $data); @@ -219,7 +219,7 @@ class WeChatNotify { 'has_template' => !empty($config['template_id']), 'bound_users' => $bound_count, 'app_secret' => !empty($config['app_secret']) ? '***' : '', - 'allowed_types' => ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply'], + 'allowed_types' => ['comment_reply', 'system_notice', 'order_paid', 'credits_change'], ]; } @@ -234,7 +234,6 @@ class WeChatNotify { 'system_notice' => true, 'order_paid' => true, 'credits_change' => false, - 'forum_reply' => false, ]; } return $subs; @@ -244,7 +243,7 @@ class WeChatNotify { * Update notification subscriptions for a user. */ public function update_user_subscriptions(int $user_id, array $subscriptions): bool { - $allowed = ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply']; + $allowed = ['comment_reply', 'system_notice', 'order_paid', 'credits_change']; $clean = []; foreach ($allowed as $key) { $clean[$key] = !empty($subscriptions[$key]); diff --git a/src/Settings/DisplayPageGroups.php b/src/Settings/DisplayPageGroups.php index e3b03867..2b03a020 100644 --- a/src/Settings/DisplayPageGroups.php +++ b/src/Settings/DisplayPageGroups.php @@ -53,7 +53,6 @@ trait DisplayPageGroups { $s = self::get_all(); $allowed_page_types = [ 'home', - 'topics', 'category', 'tag', 'author', @@ -153,7 +152,6 @@ trait DisplayPageGroups { 'category_recommend' => self::get_category_recommend_settings(), 'category' => self::get_category_page_settings(), 'tag' => self::get_tag_page_settings(), - 'special' => self::get_special_page_settings(), 'user_home' => self::get_user_home_settings(), 'other' => self::get_other_page_settings(), 'background' => self::get_global_background_settings(), @@ -205,7 +203,6 @@ trait DisplayPageGroups { 'list_card_home' => $list['card_home'], 'list_card_cat' => $list['card_cat_ids'] ?? [], 'list_card_tag' => $list['card_tag'], - 'list_card_topics' => $list['card_topics'], 'list_card_author' => $list['card_author'], ], 'thumb' => [ diff --git a/src/Settings/FacadeBulk.php b/src/Settings/FacadeBulk.php index bfae02a8..b389625f 100644 --- a/src/Settings/FacadeBulk.php +++ b/src/Settings/FacadeBulk.php @@ -67,7 +67,7 @@ trait FacadeBulk { $types = []; if (!empty($s['header_newposts_types']) && is_array($s['header_newposts_types'])) { - $types = array_values(array_filter(array_map('sanitize_key', $s['header_newposts_types']))); + $types = array_values(array_intersect(array_map('sanitize_key', $s['header_newposts_types']), ['post'])); } // zibll nav_newposts_radius is bool pill; map true→20px, false→0. Legacy int still accepted once. @@ -218,59 +218,6 @@ trait FacadeBulk { 'page_author_posts_per_page' => $author_per_page, ]; } - - - - /** - * Special/topic page display settings. - * - * @return array - */ - public static function get_special_page_settings(): array { - $s = self::get_all(); - $layout = sanitize_key((string) ($s['special_layout'] ?? 'grid')); - $source_type = sanitize_key((string) ($s['special_source_type'] ?? 'category')); - $subpage_display = sanitize_key((string) ($s['special_subpage_display'] ?? 'cards')); - $pagination = sanitize_key((string) ($s['special_pagination'] ?? 'numeric')); - $orderby = sanitize_key((string) ($s['special_orderby'] ?? 'date')); - - if (!in_array($layout, ['grid', 'list', 'masonry'], true)) { - $layout = 'grid'; - } - if (!in_array($source_type, ['category', 'tag', 'custom'], true)) { - $source_type = 'category'; - } - if (!in_array($subpage_display, ['cards', 'list', 'grid'], true)) { - $subpage_display = 'cards'; - } - if (!in_array($pagination, ['numeric', 'load_more', 'infinite'], true)) { - $pagination = 'numeric'; - } - if (!in_array($orderby, ['date', 'modified', 'views', 'comments'], true)) { - $orderby = 'date'; - } - - return [ - 'cover_enabled' => !empty($s['special_cover_enabled']), - 'summary_enabled' => !empty($s['special_summary_enabled']), - 'summary_length' => max(50, min(500, (int) ($s['special_summary_length'] ?? 200))), - 'default_cover' => esc_url_raw((string) ($s['special_default_cover'] ?? '')), - 'layout' => $layout, - 'columns' => max(1, min(4, (int) ($s['special_columns'] ?? 2))), - 'source_type' => $source_type, - 'source_ids' => trim((string) ($s['special_source_ids'] ?? '')), - 'subpage_display' => $subpage_display, - 'subpage_count' => max(1, min(20, (int) ($s['special_subpage_count'] ?? 6))), - 'sidebar' => !empty($s['special_sidebar']), - 'pagination' => $pagination, - 'per_page' => max(4, min(48, (int) ($s['special_per_page'] ?? 12))), - 'post_count' => !empty($s['special_post_count']), - 'orderby' => $orderby, - ]; - } - - - /** * Share and poster settings. * diff --git a/src/Settings/PostDisplay.php b/src/Settings/PostDisplay.php index 64d378cb..6c285c36 100644 --- a/src/Settings/PostDisplay.php +++ b/src/Settings/PostDisplay.php @@ -41,7 +41,7 @@ class PostDisplay { $sticky_pages_raw = $settings['sticky_s'] ?? null; if (is_array($sticky_pages_raw)) { - $allowed_pages = ['home', 'cat', 'tag', 'topics']; + $allowed_pages = ['home', 'cat', 'tag']; $sticky_pages = array_values(array_intersect(array_map('sanitize_key', $sticky_pages_raw), $allowed_pages)); } else { $sticky_pages = ['home', 'cat']; @@ -49,10 +49,10 @@ class PostDisplay { $badge_types_raw = $settings['list_badge_show'] ?? null; if (is_array($badge_types_raw)) { - $allowed_types = ['pay', 'cat', 'topics', 'tag']; + $allowed_types = ['pay', 'cat', 'tag']; $badge_types = array_values(array_intersect(array_map('sanitize_key', $badge_types_raw), $allowed_types)); } else { - $badge_types = ['pay', 'cat', 'topics', 'tag']; + $badge_types = ['pay', 'cat', 'tag']; } $show_author = array_key_exists('post_list_author', $settings) @@ -139,7 +139,6 @@ class PostDisplay { 'card_cat' => !empty($card_cat_ids), 'card_cat_ids' => $card_cat_ids, 'card_tag' => !empty($settings['list_card_tag']), - 'card_topics' => !empty($settings['list_card_topics']), 'card_author' => !empty($settings['list_card_author']), ]; } @@ -200,8 +199,6 @@ class PostDisplay { 'cat_show_tag' => !empty($settings['filter_cat_show_tag']), 'tag_show_cat' => !isset($settings['filter_tag_show_cat']) || !empty($settings['filter_tag_show_cat']), 'tag_show_tag' => !empty($settings['filter_tag_show_tag']), - 'topics_show_cat' => !isset($settings['filter_topics_show_cat']) || !empty($settings['filter_topics_show_cat']), - 'topics_show_tag' => !empty($settings['filter_topics_show_tag']), 'custom_filter_show' => is_array($settings['custom_filter_show'] ?? null) ? array_map('sanitize_key', $settings['custom_filter_show']) : ['cat', 'tag'], 'custom_filter' => self::sanitize_custom_filter_defs($settings['custom_filter'] ?? []), 'cat_custom_filter' => self::sanitize_cat_custom_filter($settings['cat_custom_filter'] ?? []), @@ -219,7 +216,6 @@ class PostDisplay { 'cats' => [], 'cat_s' => $cfg['cat_show_cat'], 'tag_s' => $cfg['cat_show_tag'], - 'topics_s' => false, 'orderby_s' => $cfg['sort'], 'custom_filters' => [], ]; @@ -435,7 +431,6 @@ class PostDisplay { 'pay_vip_price_s' => !isset($settings['post_article_pay_vip_price_s']) || !empty($settings['post_article_pay_vip_price_s']), 'pay_vip_1_discount' => max(0, min(100, (int) ($settings['post_article_pay_vip_1_discount'] ?? 80))), 'pay_vip_2_discount' => max(0, min(100, (int) ($settings['post_article_pay_vip_2_discount'] ?? 50))), - 'topics_s' => !empty($settings['post_article_topics_s']), 'custom_filter_s' => !isset($settings['post_article_custom_filter_s']) || !empty($settings['post_article_custom_filter_s']), ]; } @@ -660,7 +655,6 @@ class PostDisplay { 'cats' => $cats, 'cat_s' => !isset($item['cat_s']) || !empty($item['cat_s']), 'tag_s' => !empty($item['tag_s']), - 'topics_s' => !empty($item['topics_s']), 'orderby_s' => !isset($item['orderby_s']) || !empty($item['orderby_s']), 'custom_filters' => $filters, ]; diff --git a/src/Settings/Settings.php b/src/Settings/Settings.php index 7e3da7bd..7c928183 100644 --- a/src/Settings/Settings.php +++ b/src/Settings/Settings.php @@ -683,7 +683,7 @@ class Settings { * Finds the matching cat_custom_filter binding, falls back to global custom_filter. * * @param int $cat_id Category term ID. - * @return array{dimensions: array, show_cat: bool, show_tag: bool, show_topics: bool, show_orderby: bool} + * @return array{dimensions: array, show_cat: bool, show_tag: bool, show_orderby: bool} */ public static function get_filter_config_for_category(int $cat_id): array { return PostDisplay::get_filter_config_for_category($cat_id); diff --git a/src/Settings/UserRuntime.php b/src/Settings/UserRuntime.php index 7463de34..280da2d8 100644 --- a/src/Settings/UserRuntime.php +++ b/src/Settings/UserRuntime.php @@ -31,7 +31,7 @@ class UserRuntime { return $clean; }; - // Zibll author_main_tab_opt defaults: post, favorite, comment, plate, forum, follow. + // Public profile tabs supported by this theme. $normalized_tabs = $parse_csv('user_home_tabs', 'posts,favorites,comments,follow'); if (empty($normalized_tabs)) { $normalized_tabs = ['posts', 'favorites', 'comments', 'follow']; diff --git a/src/Widgets/MarketingBlocksWidget.php b/src/Widgets/MarketingBlocksWidget.php index 94ec8714..b5cca5d5 100644 --- a/src/Widgets/MarketingBlocksWidget.php +++ b/src/Widgets/MarketingBlocksWidget.php @@ -1,5 +1,5 @@ sanitize_key((string) ($tab['orderby'] ?? 'date')), 'order' => strtoupper(sanitize_key((string) ($tab['order'] ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC', 'cat' => absint($tab['category_id'] ?? 0), - 'topics' => sanitize_text_field((string) ($tab['topics'] ?? '')), 'limit_day' => max(0, (int) ($tab['limit_day'] ?? 0)), 'pay_type' => sanitize_key((string) ($tab['pay_type'] ?? '')), 'style' => $style, @@ -219,7 +218,6 @@ class TabPostsWidget extends \WP_Widget { data-orderby="" data-cat="" data-tab-count="" - data-topics="" data-limit-day="" data-pay-type="" aria-selected="" @@ -304,7 +302,7 @@ class TabPostsWidget extends \WP_Widget { $max_tabs = 8; $tabs = array_slice($tabs, 0, $max_tabs); while (count($tabs) < 3) { - $tabs[] = ['title' => '', 'category_id' => 0, 'orderby' => 'date', 'count' => 0, 'topics' => '', 'limit_day' => 0, 'pay_type' => '', 'enabled' => false]; + $tabs[] = ['title' => '', 'category_id' => 0, 'orderby' => 'date', 'count' => 0, 'limit_day' => 0, 'pay_type' => '', 'enabled' => false]; } foreach ($tabs as $i => $tab) : ?> @@ -332,10 +330,6 @@ class TabPostsWidget extends \WP_Widget { " value="">

-

- - " value=""> -

" value=""> @@ -385,7 +379,6 @@ class TabPostsWidget extends \WP_Widget { 'orderby' => $orderby, 'order' => strtoupper(sanitize_key((string) ($tab['order'] ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC', 'count' => max(0, min(20, (int) ($tab['count'] ?? 0))), - 'topics' => sanitize_text_field((string) ($tab['topics'] ?? '')), 'limit_day' => max(0, (int) ($tab['limit_day'] ?? 0)), 'pay_type' => sanitize_key((string) ($tab['pay_type'] ?? '')), 'enabled' => !empty($tab['enabled']), diff --git a/src/Widgets/WidgetMainPosts.php b/src/Widgets/WidgetMainPosts.php index cb41ce80..f4fa0afc 100644 --- a/src/Widgets/WidgetMainPosts.php +++ b/src/Widgets/WidgetMainPosts.php @@ -86,21 +86,6 @@ class WidgetMainPosts extends \WP_Widget { $query['order'] = $order; } - // Topics taxonomy (CSV term IDs). - $topics_raw = trim((string) ($instance['topics'] ?? '')); - if ($topics_raw !== '' && taxonomy_exists('topics')) { - $topic_ids = array_values(array_filter(array_map('intval', preg_split('/[,,\s]+/', $topics_raw) ?: []))); - if ($topic_ids) { - $query['tax_query'] = [ - [ - 'taxonomy' => 'topics', - 'field' => 'term_id', - 'terms' => $topic_ids, - ], - ]; - } - } - // Pay type filter (reading/download/gallery/video/vip or any paid). $pay_type = sanitize_key((string) ($instance['pay_type'] ?? '')); if ($pay_type !== '' && $pay_type !== '0' && $pay_type !== 'no') { @@ -252,7 +237,6 @@ class WidgetMainPosts extends \WP_Widget { 'order' => strtoupper(sanitize_key((string) ($instance['order'] ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC', 'cat' => (int) ($instance['cat'] ?? 0), 'limit_day' => (int) ($instance['limit_day'] ?? 0), - 'topics' => (string) ($instance['topics'] ?? ''), 'pay_type' => sanitize_key((string) ($instance['pay_type'] ?? '')), 'style' => sanitize_key((string) ($instance['style'] ?? 'list')), 'show_thumb' => !isset($instance['show_thumb']) || !empty($instance['show_thumb']) ? 1 : 0, @@ -318,7 +302,6 @@ class WidgetMainPosts extends \WP_Widget { 'order' => strtoupper(sanitize_key((string) ($instance['order'] ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC', 'cat' => (int) ($instance['cat'] ?? 0), 'limit_day' => (int) ($instance['limit_day'] ?? 0), - 'topics' => (string) ($instance['topics'] ?? ''), 'pay_type' => sanitize_key((string) ($instance['pay_type'] ?? '')), 'style' => $style, 'show_thumb' => !isset($instance['show_thumb']) || !empty($instance['show_thumb']) ? 1 : 0, @@ -423,11 +406,6 @@ class WidgetMainPosts extends \WP_Widget {

-

- -

-

- -