refactor: remove forum and topic feature chains

This commit is contained in:
2026-08-17 14:52:19 +08:00
parent 698e3750f9
commit 6c6c462df8
69 changed files with 339 additions and 2057 deletions
+3
View File
@@ -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/
-2
View File
@@ -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`
@@ -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',
@@ -99,7 +99,7 @@
</n-form>
<div v-if="form.home_lists.length === 0" class="homepage-settings__empty-tabs">
<n-text depth="3">暂无更多栏目,点击“添加栏目”创建分类/专题 Tab。</n-text>
<n-text depth="3">暂无更多栏目,点击“添加栏目”创建分类 Tab。</n-text>
</div>
<div v-for="(tab, index) in form.home_lists" :key="index" class="homepage-settings__tab-row">
@@ -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 {
@@ -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' },
]},
],
},
],
},
}
@@ -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',
@@ -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 },
],
},
@@ -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 } },
@@ -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 } },
],
-1
View File
@@ -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");
-69
View File
@@ -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);
}
-165
View File
@@ -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;
}
-98
View File
@@ -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;
}
+1 -216
View File
@@ -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; }
+1 -46
View File
@@ -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; }
-279
View File
@@ -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;
+1 -2
View File
@@ -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");
@@ -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);
}
-237
View File
@@ -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;
}
}
+7 -94
View File
@@ -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;
}
-1
View File
@@ -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') || '',
});
+2 -2
View File
@@ -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';
+60 -83
View File
@@ -1,83 +1,60 @@
<?php
/**
* AKSRT Theme Core Hooks
*
* 从 functions.php 中抽离的核心功能钩子:
* - SMTP 邮件配置注入
* - 评论开关控制
* - Banner CPT 注册
* - Admin Bar 隐藏
*
* @package AKSRT
* @version 3.2.0
*/
defined('ABSPATH') || exit;
// ============================================================
// 评论功能开关
// ============================================================
add_filter('comments_open', function ($open, $post_id) {
if (class_exists('\AKSRT\Settings\Settings')) {
$display = \AKSRT\Settings\Settings::get_comment_display_settings();
if (!empty($display['close_comments'])) {
return false;
}
}
return $open;
}, 10, 2);
add_filter('comment_text', function ($comment_text, $comment = null, $args = []) {
if (function_exists('aksrt_render_comment_content')) {
return aksrt_render_comment_content((string) $comment_text);
}
return $comment_text;
}, 20, 3);
// ============================================================
// 注册自定义文章类型 - Banner (REST API for SPA)
// ============================================================
function aksrt_register_banner_cpt() {
register_post_type('aksrt_banner', array(
'labels' => 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');
// ============================================================
<?php
/**
* AKSRT Theme Core Hooks
*
* 从 functions.php 中抽离的核心功能钩子:
* - SMTP 邮件配置注入
* - 评论开关控制
* - Banner CPT 注册
* - Admin Bar 隐藏
*
* @package AKSRT
* @version 3.2.0
*/
defined('ABSPATH') || exit;
// ============================================================
// 评论功能开关
// ============================================================
add_filter('comments_open', function ($open, $post_id) {
if (class_exists('\AKSRT\Settings\Settings')) {
$display = \AKSRT\Settings\Settings::get_comment_display_settings();
if (!empty($display['close_comments'])) {
return false;
}
}
return $open;
}, 10, 2);
add_filter('comment_text', function ($comment_text, $comment = null, $args = []) {
if (function_exists('aksrt_render_comment_content')) {
return aksrt_render_comment_content((string) $comment_text);
}
return $comment_text;
}, 20, 3);
// ============================================================
// 注册自定义文章类型 - Banner (REST API for SPA)
// ============================================================
function aksrt_register_banner_cpt() {
register_post_type('aksrt_banner', array(
'labels' => 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 -8
View File
@@ -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<string,mixed> $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<string,mixed> $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);
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* Shared coupon burn helpers for cash content / topic orders.
* Shared coupon burn helpers for cash content orders.
*
* Idempotent via coupon_usage.order_number. Prefer note.coupon snapshot ids
* so burn still works after use_coupon increments used_count past limit.
+1 -1
View File
@@ -34,7 +34,7 @@ if (!function_exists('aksrt_get_new_add_actions')) :
/**
* Build multi-type publish actions.
*
* @param string[] $types post|topic|product
* @param string[] $types Currently only post is supported.
* @return list<array{type:string,url:string,label:string,icon:string}>
*/
function aksrt_get_new_add_actions(array $types = ['post']): array {
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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<int, array{id:string,name:string}>
*/
-7
View File
@@ -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[] = '<a href="' . esc_url(get_term_link($topic)) . '" class="but"><i class="fas fa-cube" aria-hidden="true"></i> ' . esc_html($topic->name) . '</a>';
}
}
if (!empty($data['is_resource'])) {
$items[] = '<span class="but jb-vip">VIP</span>';
}
+3 -16
View File
@@ -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',
'<i class="fa fa-cube" aria-hidden="true"></i> ',
['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 '';
}
+1 -11
View File
@@ -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) {
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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';
}
@@ -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})) {
-1
View File
@@ -92,7 +92,6 @@ class ExtensionController extends ControllerBase {
'data' => [
'total' => 0,
'nav_count' => 0,
'special_count' => 0,
],
]);
}
+1 -23
View File
@@ -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]);
}
+2 -5
View File
@@ -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)) {
-2
View File
@@ -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' => [
@@ -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' => '用户页卡片模式',
-64
View File
@@ -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' => '全局背景',
+1 -6
View File
@@ -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' => ''],
]],
+1 -1
View File
@@ -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;
-1
View File
@@ -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,
+2 -11
View File
@@ -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<string,mixed> $data
* @param array<string,mixed> $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;
}
+1 -1
View File
@@ -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'),
+2 -2
View File
@@ -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) {
-4
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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)
+3 -4
View File
@@ -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]);
-3
View File
@@ -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' => [
+1 -54
View File
@@ -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.
*
+3 -9
View File
@@ -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,
];
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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'];
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
/** Structured marketing widgets (no commerce/forum behavior). */
/** Structured marketing widgets. */
namespace AKSRT\Widgets;
defined('ABSPATH') || exit;
+1 -8
View File
@@ -110,7 +110,6 @@ class TabPostsWidget extends \WP_Widget {
'orderby' => 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="<?php echo esc_attr($tab['orderby']); ?>"
data-cat="<?php echo (int) $tab['category_id']; ?>"
data-tab-count="<?php echo (int) $tab['count']; ?>"
data-topics="<?php echo esc_attr((string) ($tab['topics'] ?? '')); ?>"
data-limit-day="<?php echo esc_attr((string) ((int) ($tab['limit_day'] ?? 0))); ?>"
data-pay-type="<?php echo esc_attr((string) ($tab['pay_type'] ?? '')); ?>"
aria-selected="<?php echo $first ? 'true' : 'false'; ?>"
@@ -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 {
<label><?php esc_html_e('数量(0=使用默认):', 'aksrt'); ?></label>
<input class="tiny-text" type="number" min="0" max="20" name="<?php echo esc_attr($this->get_field_name("tabs[{$i}][count]")); ?>" value="<?php echo (int) $tab['count']; ?>">
</p>
<p style="margin:0 0 6px;">
<label><?php esc_html_e('专题 topics ID(逗号):', 'aksrt'); ?></label>
<input class="widefat" type="text" name="<?php echo esc_attr($this->get_field_name("tabs[{$i}][topics]")); ?>" value="<?php echo esc_attr((string) ($tab['topics'] ?? '')); ?>">
</p>
<p style="margin:0 0 6px;">
<label><?php esc_html_e('最近 N 天(0=不限):', 'aksrt'); ?></label>
<input class="tiny-text" type="number" min="0" name="<?php echo esc_attr($this->get_field_name("tabs[{$i}][limit_day]")); ?>" value="<?php echo (int) ($tab['limit_day'] ?? 0); ?>">
@@ -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']),
-23
View File
@@ -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 {
</select>
</label>
</p>
<p>
<label><?php esc_html_e('专题 topics ID(逗号)', 'aksrt'); ?>
<input class="widefat" type="text" name="<?php echo esc_attr($this->get_field_name('topics')); ?>" value="<?php echo esc_attr((string) ($instance['topics'] ?? '')); ?>">
</label>
</p>
<p>
<label><?php esc_html_e('付费类型', 'aksrt'); ?>
<select name="<?php echo esc_attr($this->get_field_name('pay_type')); ?>">
@@ -470,7 +448,6 @@ class WidgetMainPosts extends \WP_Widget {
'order' => strtoupper(sanitize_key((string) ($new_instance['order'] ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC',
'cat' => max(0, (int) ($new_instance['cat'] ?? 0)),
'limit_day' => max(0, (int) ($new_instance['limit_day'] ?? 0)),
'topics' => sanitize_text_field((string) ($new_instance['topics'] ?? '')),
'pay_type' => sanitize_key((string) ($new_instance['pay_type'] ?? '')),
'paginate' => $paginate,
'load_mode' => sanitize_key((string) ($new_instance['load_mode'] ?? 'detail')) === 'ajax' ? 'ajax' : 'detail',
-17
View File
@@ -80,17 +80,6 @@ class WidgetOnelinePosts extends \WP_Widget {
$query['orderby'] = 'date';
$query['order'] = $order;
}
$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 = sanitize_key((string) ($instance['pay_type'] ?? ''));
if ($pay_type !== '' && $pay_type !== '0' && $pay_type !== 'no') {
if ($pay_type === 'any' || $pay_type === 'paid') {
@@ -257,11 +246,6 @@ class WidgetOnelinePosts extends \WP_Widget {
<input class="tiny-text" type="number" min="0" name="<?php echo esc_attr($this->get_field_name('limit_day')); ?>" value="<?php echo esc_attr((string) ((int) ($instance['limit_day'] ?? 0))); ?>">
</label>
</p>
<p>
<label><?php esc_html_e('专题 topics ID(逗号)', 'aksrt'); ?>
<input class="widefat" type="text" name="<?php echo esc_attr($this->get_field_name('topics')); ?>" value="<?php echo esc_attr((string) ($instance['topics'] ?? '')); ?>">
</label>
</p>
<p>
<label><?php esc_html_e('付费类型', 'aksrt'); ?>
<select name="<?php echo esc_attr($this->get_field_name('pay_type')); ?>">
@@ -297,7 +281,6 @@ class WidgetOnelinePosts extends \WP_Widget {
'order' => strtoupper(sanitize_key((string) ($new_instance['order'] ?? 'desc'))) === 'ASC' ? 'ASC' : 'DESC',
'cat' => max(0, (int) ($new_instance['cat'] ?? 0)),
'limit_day' => max(0, (int) ($new_instance['limit_day'] ?? 0)),
'topics' => sanitize_text_field((string) ($new_instance['topics'] ?? '')),
'pay_type' => sanitize_key((string) ($new_instance['pay_type'] ?? '')),
]; return $business;
}
-148
View File
@@ -1,148 +0,0 @@
<?php
/**
* Template Name: AKSRT - Special Page
*
* 专题聚合页模板 — 用于内容专题、活动页、产品介绍页等。
* 读取 \AKSRT\Settings\Settings 中的 page_display.special 配置,支持 per-page meta 覆盖。
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
get_header();
$post_id = get_the_ID();
// 从门面 getter 读取专题页设置(validated & sanitized)
$special = class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::get_special_page_settings()
: [];
$defaults = [
'cover_enabled' => true,
'summary_enabled' => true,
'summary_length' => 200,
'default_cover' => '',
'layout' => 'grid',
'columns' => 2,
'source_type' => 'category',
'source_ids' => '',
'subpage_display' => 'cards',
'subpage_count' => 6,
'sidebar' => true,
'pagination' => 'numeric',
'per_page' => 12,
'post_count' => false,
'orderby' => 'date',
];
$settings = array_merge($defaults, $special);
// Per-page meta override
$meta_layout = get_post_meta($post_id, '_aksrt_special_layout', true);
$meta_columns = get_post_meta($post_id, '_aksrt_special_columns', true);
$meta_source = get_post_meta($post_id, '_aksrt_special_source_type', true);
$meta_ids = get_post_meta($post_id, '_aksrt_special_source_ids', true);
if ($meta_layout) $settings['layout'] = sanitize_key($meta_layout);
if ($meta_columns) $settings['columns'] = max(1, min(4, (int) $meta_columns));
if ($meta_source) $settings['source_type'] = sanitize_key($meta_source);
if ($meta_ids !== '' && $meta_ids !== false) $settings['source_ids'] = $meta_ids;
$layout = in_array($settings['layout'], ['grid', 'list', 'masonry'], true) ? $settings['layout'] : 'grid';
$columns = max(1, min(4, (int) $settings['columns']));
$show_cover = !empty($settings['cover_enabled']);
$show_summary = !empty($settings['summary_enabled']);
$summary_len = max(50, min(500, (int) $settings['summary_length']));
$subpage_style = in_array($settings['subpage_display'], ['cards', 'list', 'timeline'], true) ? $settings['subpage_display'] : 'cards';
$per_page = max(4, min(48, (int) $settings['per_page']));
$orderby = in_array($settings['orderby'], ['date', 'modified', 'views', 'comments'], true) ? $settings['orderby'] : 'date';
// 聚合内容源
$source_type = sanitize_key($settings['source_type']);
$source_ids = array_filter(array_map('absint', explode(',', (string) $settings['source_ids'])));
$aggregated_posts = [];
if (!empty($source_ids)) {
$args = [
'posts_per_page' => $per_page,
'post_status' => 'publish',
'orderby' => ($orderby === 'modified') ? 'modified' : 'date',
'order' => 'DESC',
];
if ($source_type === 'category') {
$args['category__in'] = $source_ids;
} elseif ($source_type === 'tag') {
$args['tag__in'] = $source_ids;
}
$aggregated_query = new WP_Query($args);
$aggregated_posts = $aggregated_query->posts;
}
// 子页面列表
$children_per_page = max(1, min(20, (int) $settings['subpage_count']));
$children = get_pages([
'child_of' => $post_id,
'sort_column' => 'menu_order',
'sort_order' => 'ASC',
'parent' => $post_id,
'number' => $children_per_page,
]);
?>
<main id="main-content" class="site-main content-shell content-shell--page aksrt-special--<?php echo esc_attr($layout); ?>" tabindex="-1">
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
<?php if ($show_cover) :
$default_cover = $settings['default_cover'] ?? '';
$show_post_count = !empty($settings['post_count']);
include get_template_directory() . '/templates/parts/special/special-cover.php';
endif; ?>
<div class="aksrt-special-content container">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="aksrt-special-content__body">
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>
</div>
<?php if (!empty($aggregated_posts)) : ?>
<section class="aksrt-special-aggregated container">
<h2 class="aksrt-special-aggregated__title"><?php esc_html_e('相关内容', 'aksrt'); ?></h2>
<?php
// Use the special-grid part
$grid_posts = $aggregated_posts;
$show_dates = true;
include get_template_directory() . '/templates/parts/special/special-grid.php';
?>
</section>
<?php endif; ?>
<?php if (!empty($children)) : ?>
<section class="aksrt-special-children container">
<h2 class="aksrt-special-children__title"><?php esc_html_e('子页面', 'aksrt'); ?></h2>
<div class="aksrt-special-children__grid aksrt-special-children__grid--<?php echo esc_attr($subpage_style); ?>" style="--aksrt-cols:<?php echo esc_attr((string) $columns); ?>">
<?php foreach ($children as $child) :
$child_img = get_the_post_thumbnail_url($child->ID, 'medium');
?>
<a href="<?php echo esc_url(get_permalink($child->ID)); ?>" class="aksrt-special-child-card">
<?php if ($child_img) : ?>
<div class="aksrt-special-child-card__image">
<img src="<?php echo esc_url($child_img); ?>" alt=""<?php echo function_exists('aksrt_lazy_loading') ? aksrt_lazy_loading('other') : ' loading="lazy"'; ?>>
</div>
<?php endif; ?>
<div class="aksrt-special-child-card__body">
<h3 class="aksrt-special-child-card__title"><?php echo esc_html($child->post_title); ?></h3>
<?php if ($child->post_excerpt !== '') : ?>
<p class="aksrt-special-child-card__desc"><?php echo esc_html(wp_trim_words($child->post_excerpt, 30)); ?></p>
<?php endif; ?>
</div>
</a>
<?php endforeach; ?>
</div>
</section>
<?php endif; ?>
</main>
<?php
get_footer();
-66
View File
@@ -1,66 +0,0 @@
<?php
/**
* Special Page Cover
*
* Renders the cover section for a special/topic page with
* background image, title, summary, and metadata.
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
$post_id = get_the_ID();
$cover_img = get_the_post_thumbnail_url($post_id, 'large');
$default_cover = isset($default_cover) ? $default_cover : '';
$show_post_count = isset($show_post_count) ? $show_post_count : true;
if (empty($cover_img) && !empty($default_cover)) {
$cover_img = $default_cover;
}
$title = get_the_title();
$excerpt = get_the_excerpt();
$summary_len = isset($summary_len) ? (int) $summary_len : 200;
if ($excerpt) {
$excerpt = wp_trim_words($excerpt, $summary_len, '...');
}
// Per-page meta
$cover_color = get_post_meta($post_id, '_aksrt_special_cover_color', true);
$cover_style = '';
if ($cover_color) {
$cover_style = 'background-color:' . sanitize_hex_color($cover_color) . ';';
}
?>
<header class="aksrt-special-cover" <?php echo $cover_style ? 'style="' . esc_attr($cover_style) . '"' : ''; ?>>
<?php if ($cover_img) : ?>
<div class="aksrt-special-cover__bg">
<img src="<?php echo esc_url($cover_img); ?>" alt=""<?php echo function_exists('aksrt_lazy_loading') ? aksrt_lazy_loading('cover') : ' loading="lazy"'; ?> class="aksrt-special-cover__img">
<div class="aksrt-special-cover__overlay"></div>
</div>
<?php endif; ?>
<div class="aksrt-special-cover__content">
<h1 class="aksrt-special-cover__title"><?php echo esc_html($title); ?></h1>
<?php if ($excerpt) : ?>
<p class="aksrt-special-cover__summary"><?php echo esc_html($excerpt); ?></p>
<?php endif; ?>
<div class="aksrt-special-cover__meta">
<span class="aksrt-special-cover__date">
<i class="fas fa-calendar-alt"></i>
<?php echo esc_html(get_the_date()); ?>
</span>
<?php
if ($show_post_count) :
$children = get_pages(['child_of' => $post_id, 'parent' => $post_id, 'post_status' => 'publish', 'fields' => 'ids']);
if (!empty($children)) : ?>
<span class="aksrt-special-cover__count">
<i class="fas fa-file-alt"></i>
<?php printf(esc_html__('%d 篇文章', 'aksrt'), count($children)); ?>
</span>
<?php endif; endif; ?>
</div>
</div>
</header>
-46
View File
@@ -1,46 +0,0 @@
<?php
/**
* Special Page Grid
*
* Renders the content grid for a special/topic page.
* Supports grid, list, and masonry layouts.
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
$posts = isset($posts) ? $posts : [];
$layout = isset($layout) ? $layout : 'grid';
$columns = isset($columns) ? (int) $columns : 2;
$show_dates = isset($show_dates) ? $show_dates : true;
if (empty($posts)) return;
?>
<div class="aksrt-special-grid aksrt-special-grid--<?php echo esc_attr($layout); ?>" style="--aksrt-cols:<?php echo esc_attr((string) $columns); ?>">
<?php foreach ($posts as $post) :
setup_postdata($post);
$img = get_the_post_thumbnail_url($post->ID, 'medium');
?>
<article class="aksrt-special-grid__item">
<a href="<?php echo esc_url(get_permalink($post->ID)); ?>" class="aksrt-special-grid__link">
<?php if ($img) : ?>
<div class="aksrt-special-grid__thumb">
<img src="<?php echo esc_url($img); ?>" alt=""<?php echo function_exists('aksrt_lazy_loading') ? aksrt_lazy_loading('other') : ' loading="lazy"'; ?>>
</div>
<?php endif; ?>
<div class="aksrt-special-grid__body">
<h3 class="aksrt-special-grid__title"><?php echo esc_html($post->post_title); ?></h3>
<?php if ($post->post_excerpt) : ?>
<p class="aksrt-special-grid__desc"><?php echo esc_html(wp_trim_words($post->post_excerpt, 20)); ?></p>
<?php endif; ?>
<?php if ($show_dates) : ?>
<time class="aksrt-special-grid__date" datetime="<?php echo esc_attr(get_the_date('c', $post->ID)); ?>">
<?php echo esc_html(get_the_date('', $post->ID)); ?>
</time>
<?php endif; ?>
</div>
</a>
</article>
<?php endforeach; wp_reset_postdata(); ?>
</div>
-15
View File
@@ -98,19 +98,6 @@ if (is_wp_error($categories)) {
}
$current_cats = $edit_post ? wp_get_post_categories($edit_post->ID) : [];
$topics_terms = [];
$current_topics = [];
if (!empty($settings['topics_s']) && taxonomy_exists('topics')) {
$topics_terms = get_terms(['taxonomy' => 'topics', 'hide_empty' => false, 'orderby' => 'name', 'order' => 'ASC']);
if (is_wp_error($topics_terms)) {
$topics_terms = [];
}
if ($edit_post) {
$t = wp_get_object_terms($edit_post->ID, 'topics', ['fields' => 'ids']);
$current_topics = is_wp_error($t) ? [] : $t;
}
}
$custom_dimensions = [];
$current_cf = [];
if (!empty($settings['custom_filter_s']) && class_exists('\AKSRT\Settings\Settings')) {
@@ -192,8 +179,6 @@ return [
'featured_args' => $featured_args,
'categories' => $categories,
'current_cats' => $current_cats,
'topics_terms' => $topics_terms,
'current_topics' => $current_topics,
'custom_dimensions' => $custom_dimensions,
'current_cf' => $current_cf,
'current_title' => $current_title,
-12
View File
@@ -48,18 +48,6 @@ if (file_exists($term_helper)) {
</details>
<?php endif; ?>
<?php if (!empty($settings['topics_s']) && !empty($ctx['topics_terms'])) : ?>
<details class="aksrt-submit-drop">
<summary>
<span><i class="fa fa-cube"></i> <?php esc_html_e('专题', 'aksrt'); ?></span>
<i class="fa fa-angle-right"></i>
</summary>
<div class="aksrt-submit-drop__body">
<?php aksrt_submit_render_term_checks($ctx['topics_terms'], array_map('intval', $ctx['current_topics']), 'topics', 'topics'); ?>
</div>
</details>
<?php endif; ?>
<?php if (!empty($settings['custom_filter_s']) && !empty($ctx['custom_dimensions'])) : ?>
<?php foreach ($ctx['custom_dimensions'] as $dim) :
$key = sanitize_key((string) ($dim['key'] ?? ''));
+6 -6
View File
@@ -30,16 +30,16 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
$items = is_array($list['items'] ?? null) ? $list['items'] : [];
$total_pages = max(1, (int) ($list['total_pages'] ?? 1));
?>
<div class="uh-forum__subtabs uh-follow__subtabs">
<a class="uh-forum__subtab<?php echo $follow_sub === 'following' ? ' is-active' : ''; ?>"
<div class="uh-follow__subtabs">
<a class="uh-follow__subtab<?php echo $follow_sub === 'following' ? ' is-active' : ''; ?>"
href="<?php echo esc_url(add_query_arg(['tab' => 'follow', 'follow_sub' => 'following', 'follow_page' => 1], $home_url)); ?>">
<i class="fas fa-user-plus"></i> <?php esc_html_e('关注', 'aksrt'); ?>
<span class="uh-forum__subtab-count"><?php echo esc_html((string) $following_count); ?></span>
<span class="uh-follow__subtab-count"><?php echo esc_html((string) $following_count); ?></span>
</a>
<a class="uh-forum__subtab<?php echo $follow_sub === 'followers' ? ' is-active' : ''; ?>"
<a class="uh-follow__subtab<?php echo $follow_sub === 'followers' ? ' is-active' : ''; ?>"
href="<?php echo esc_url(add_query_arg(['tab' => 'follow', 'follow_sub' => 'followers', 'follow_page' => 1], $home_url)); ?>">
<i class="fas fa-users"></i> <?php esc_html_e('粉丝', 'aksrt'); ?>
<span class="uh-forum__subtab-count"><?php echo esc_html((string) $follower_count); ?></span>
<span class="uh-follow__subtab-count"><?php echo esc_html((string) $follower_count); ?></span>
</a>
</div>
@@ -64,7 +64,7 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
<?php endforeach; ?>
</div>
<?php if ($total_pages > 1) : ?>
<div class="uh-forum__pagination">
<div class="uh-follow__pagination">
<?php
echo paginate_links([
'base' => add_query_arg(['tab' => 'follow', 'follow_sub' => $follow_sub, 'follow_page' => '%#%'], $home_url),
-1
View File
@@ -31,7 +31,6 @@ Exit code `1` means hard contract errors.
| extensions | `AKSRT_Admin_Schema_Extensions` | `extensions.js` |
| tools | `AKSRT_Admin_Schema_Tools` | `tools.js` |
| shop | `AKSRT_Admin_Schema_Shop` | `shop.js` |
| forum | `AKSRT_Admin_Schema_Forum` | `forum.js` |
## Known custom pages (not schema REST)
-1
View File
@@ -19,7 +19,6 @@ Domain folders were frozen after the root→domain move. Theme types then migrat
| User center/home/badges/level/metrics/notifications/follow | `User` | Account surface |
| Credits, balance wallet, signin, invite, points-free | `Credits` | Points + cash wallet |
| Download tokens/state, content pay, VIP, visibility | `Content` | Post-centric paid content |
| Topic pay, plate follow pay | `Forum` | Forum SKUs (not generic content pay) |
| Orders, gateways, coupon, charge-card, revenue, creator-revenue, withdrawal, rebate, discount, after-sale, shipping, wechat-notify | `Payment` | Commerce + settlement |
| Shop services/meta/reviews | `Shop` | Product catalog / cart |
| SMS stack | `Sms` | Messaging channel |
-1
View File
@@ -52,7 +52,6 @@ function collect_php_schema_sections(string $themeRoot): array {
'extensions' => $themeRoot . '/src/Admin/Schema/SchemaExtensions.php',
'tools' => $themeRoot . '/src/Admin/Schema/SchemaTools.php',
'shop' => $themeRoot . '/src/Admin/Schema/SchemaShop.php',
'forum' => $themeRoot . '/src/Admin/Schema/SchemaForum.php',
];
foreach ($primary as $domain => $file) {