get_home_view($current_user_id) : [ 'boards' => [], 'recent_topics' => [], 'hot_topics' => [], 'stats' => [], 'permissions' => ['can_compose' => false, 'can_manage' => false], 'applications' => [], 'home_tabs' => [], 'active_index' => 1, 'quick_posts' => true, ]; $boards = $view['boards'] ?? []; $recent_topics = $view['recent_topics'] ?? []; $hot_topics = $view['hot_topics'] ?? []; $stats = $view['stats'] ?? []; $permissions = $view['permissions'] ?? []; $applications = $view['applications'] ?? []; $compose_url = home_url('/compose/'); $forum_settings = class_exists('AKSRT_Settings') ? AKSRT_Settings::get_forum_settings() : []; $forum_names = $forum_settings['names'] ?? []; $name_forum = $forum_names['forum'] ?? __('论坛', 'aksrt'); $name_plate = $forum_names['plate'] ?? __('版块', 'aksrt'); $name_topic = $forum_names['posts'] ?? __('主题', 'aksrt'); $name_reply = $forum_names['comment'] ?? __('回复', 'aksrt'); $admin_forum_url = admin_url('admin.php?page=aksrt-theme-admin#/forum'); $home_tabs = $view['home_tabs'] ?? []; $active_index = max(0, min(count($home_tabs) - 1, (int) ($view['active_index'] ?? 1))); $quick_posts = !empty($view['quick_posts']); $nonce = wp_create_nonce('aksrt_public_nonce'); // Resolve active tab from query param or default $active_tab_type = isset($_GET['forum_tab']) ? sanitize_key(wp_unslash($_GET['forum_tab'])) : ''; if ($active_tab_type === '' && isset($home_tabs[$active_index])) { $active_tab_type = $home_tabs[$active_index]['type'] ?? 'synthesis'; } if ($active_tab_type === '') { $active_tab_type = 'synthesis'; } ?>

get_follow_stream($current_user_id) : ['items' => []]; if (!empty($follow_data['items'])) : ?>
render_topic_row($topic); } ?>
1) : ?>
0) : ?>

get_pending_stream($current_user_id) : ['items' => []]; if (!empty($pending_data['items'])) : ?>
render_topic_row($topic); } ?>

render_topic_row($topic); } } ?>