term_id : 0; $forum_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_forum_settings() : []; $forum_names = $forum_settings['names'] ?? []; $forum_name = $forum_names['forum'] ?? __('论坛', 'aksrt'); $plates = []; if ($forum && $cat_id > 0) { $plates = $forum->get_sorted_plates('menu_order', 'ASC', 100); $plates = array_filter($plates, static function ($plate) use ($cat_id): bool { return isset($plate['plate_cat']['id']) && (int) $plate['plate_cat']['id'] === $cat_id; }); $plates = array_values($plates); } $cat_moderator_ids = get_term_meta($cat_id, '_aksrt_cat_moderator', true); $cat_moderators = []; if (is_array($cat_moderator_ids)) { foreach ($cat_moderator_ids as $uid) { $user = get_userdata((int) $uid); if ($user) { $cat_moderators[] = [ 'id' => (int) $user->ID, 'name' => $user->display_name, 'avatar' => function_exists('aksrt_get_avatar_url') ? aksrt_get_avatar_url($user->ID, 36) : get_avatar_url($user->ID, ['size' => 36]), ]; } } } ?>

name : ''); ?>

description) : ?>

description); ?>