feat: 收口 1:1 剩余欠账(论坛壳/圈子/501/私信默认/资源死码)
- 论坛 board/topic/plate/tag/plate-cat 接入 content-wrap/content-layout 主站流壳 - 公共主页 plate 圈子 tab 接关注/管理版块真实数据并计数 - forum-topic 渲染封面/付费扩展位 meta(§7.3) - 后台删除消息/背景图/评论图 REST 从 501 补齐为真实实现 - 私信 private_s 缺省 true(完整 1:1,不再兼容默认关) - 清理 aksrt_get_resource_meta 不可达旧实现;挂载 AKSRT_AI 配置门控实例 - 登录 modal 启用 colorful-header;订单页粉边 focus 软化;侧栏次级入口视觉弱化 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0941c7d23f
commit
fb68b3f8c6
16 files changed
+313
-82
No files matched your search
@@ -172,6 +172,50 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
|
||||
|
||||
<?php if (in_array('plate', $enabled_tabs, true)) : ?>
|
||||
<div id="panel-plate" class="dashboard-panel<?php echo $active_tab === 'plate' ? ' is-active' : ''; ?>" role="tabpanel"<?php echo $active_tab !== 'plate' ? ' hidden' : ''; ?>>
|
||||
<?php aksrt_render_profile_empty($svg_empty_post, __('暂无圈子内容', 'aksrt')); ?>
|
||||
<?php
|
||||
$plate_items = [];
|
||||
if ($forum_instance) {
|
||||
if (method_exists($forum_instance, 'get_user_followed_plates')) {
|
||||
$plate_items = array_merge($plate_items, (array) $forum_instance->get_user_followed_plates((int) $user_id));
|
||||
}
|
||||
if (method_exists($forum_instance, 'get_user_managed_plates')) {
|
||||
$managed = (array) $forum_instance->get_user_managed_plates((int) $user_id);
|
||||
foreach (['owned', 'moderating'] as $bucket) {
|
||||
foreach ((array) ($managed[$bucket] ?? []) as $plate) {
|
||||
$plate_items[] = $plate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// de-dupe by id
|
||||
$seen = [];
|
||||
$unique_plates = [];
|
||||
foreach ($plate_items as $plate) {
|
||||
$pid = (int) ($plate['id'] ?? 0);
|
||||
if ($pid <= 0 || isset($seen[$pid])) {
|
||||
continue;
|
||||
}
|
||||
$seen[$pid] = true;
|
||||
$unique_plates[] = $plate;
|
||||
}
|
||||
if (!empty($unique_plates)) :
|
||||
?>
|
||||
<div class="uh-forum__plate-grid">
|
||||
<?php foreach ($unique_plates as $plate) :
|
||||
$purl = !empty($plate['url']) ? (string) $plate['url'] : get_permalink((int) ($plate['id'] ?? 0));
|
||||
?>
|
||||
<a class="uh-forum__plate-card" href="<?php echo esc_url((string) $purl); ?>">
|
||||
<div class="uh-forum__plate-name"><?php echo esc_html((string) ($plate['name'] ?? '')); ?></div>
|
||||
<div class="uh-forum__plate-stats">
|
||||
<span><?php printf(esc_html__('%d 帖子', 'aksrt'), (int) ($plate['topic_count'] ?? $plate['post_count'] ?? 0)); ?></span>
|
||||
<span><?php printf(esc_html__('%d 关注', 'aksrt'), (int) ($plate['follow_count'] ?? 0)); ?></span>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php else :
|
||||
aksrt_render_profile_empty($svg_empty_post, __('暂无圈子内容', 'aksrt'));
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in new issue
Block a user