| | |
| | | use JVBase\managers\LoginManager; |
| | | use JVBase\managers\MagicLinkManager; |
| | | use JVBase\managers\queue\Queue; |
| | | use JVBase\managers\DashboardManager; |
| | | use JVBase\managers\Dashboard\DashboardManager; |
| | | use JVBase\managers\DirectoryManager; |
| | | use JVBase\managers\ReferralManager; |
| | | use JVBase\managers\RoleManager; |
| | |
| | | $this->routes['referral'] = new ReferralRoutes(); |
| | | } |
| | | |
| | | if (Site::has('dashboard')) { |
| | | $this->managers['dash'] = new DashboardManager(); |
| | | } |
| | | |
| | | if (Site::hasIntegration('square')) { |
| | | $this->routes['square'] = new IntegrationsSquareRoutes(); |
| | |
| | | $this->managers['notifications'] = new NotificationManager(); |
| | | $this->routes['notifications'] = new NotificationsRoutes(); |
| | | } |
| | | if (!empty(Registrar::getFeatured('approve_new'))) { |
| | | if (!empty(Registrar::withFeature('approve_new'))) { |
| | | $this->managers['approvals'] = new ApprovalManager(); |
| | | } |
| | | if (Site::has('feed_block') || Site::has('dashboard')) { |
| | |
| | | if ($membership && $membership->has('invitable')) { |
| | | $this->managers['invitations'] = new InvitationsManager(); |
| | | } |
| | | if (!empty(Registrar::getFeatured('has_responses'))) { |
| | | if (!empty(Registrar::withFeature('has_responses'))) { |
| | | $this->routes['comments'] = new ResponseRoutes(); |
| | | } |
| | | if (!empty(Registrar::getFeatured('karma'))) { |
| | | if (!empty(Registrar::withFeature('karma'))) { |
| | | $this->routes['vote'] = new VoteRoutes(); |
| | | } |
| | | if (!empty(Registrar::getFeatured('karma')) |
| | | if (!empty(Registrar::withFeature('karma')) |
| | | || ($membership && $membership->has('member_verified')) || |
| | | ($membership && $membership->has('term_approval'))) { |
| | | $this->routes['approvals'] = new ApprovalRoutes(); |
| | |
| | | $this->routes['invites'] = new Invitations(); |
| | | } |
| | | |
| | | |
| | | if (Site::has('dashboard')) { |
| | | $this->managers['dash'] = new DashboardManager(); |
| | | } |
| | | |
| | | $this->setupIntegrations(); |
| | | |
| | | add_action('wp_footer', [$this, 'additionalActions']); |
| | |
| | | return array_merge(array_keys($this->content), array_keys($this->taxonomies)); |
| | | } |
| | | |
| | | public function favourites(): FavouritesManager|false |
| | | { |
| | | return $this->managers['favourites'] ?? false; |
| | | } |
| | | |
| | | public function dashboard(): DashboardManager|false |
| | | { |
| | | return $this->managers['dash'] ?? false; |
| | |
| | | |
| | | if (!empty ($buttons)) { |
| | | ?> |
| | | <section class="additional-actions"> |
| | | <section class="main-actions"> |
| | | <div class="buttons col"> |
| | | <?= implode($buttons); ?> |
| | | </div> |