shouldUseCommunityPortal()) { return; } // Tell FC 'support' is a known route so it doesn't redirect to all_feeds. add_filter('fluent_community/app_route_paths', [$this, 'registerSupportRoute']); add_action('fluent_community/rendering_path_ssr_support', [$this, 'renderSupportPortal']); // FC's Vue router has no /support route and would fall through to NotFound. // Turn SPA navigation to /support into a full page load so the SSR hook runs. // Needed on every portal page, not only the support route. add_action('fluent_community/portal_footer', [$this, 'outputRouterGuard'], 999); } public function registerSupportRoute($paths) { $paths[] = 'support'; return $paths; } public function renderSupportPortal($parts = []) { if (!is_user_logged_in()) { wp_safe_redirect($this->getCommunityAuthUrl()); exit; } (new PortalRenderer())->render(); } public function outputRouterGuard() { $supportUrl = \FluentCommunity\App\Services\Helper::baseUrl('support/'); ?>