| | |
| | | public function __construct() |
| | | { |
| | | $this->cache = Cache::for('dashboard', WEEK_IN_SECONDS)->user(); |
| | | if (JVB_TESTING) { |
| | | $this->cache->flush(); |
| | | } |
| | | |
| | | |
| | | add_action('init', [$this, 'registerDashboard']); |
| | | |
| | |
| | | if ($connection !== 'integrations') { |
| | | |
| | | $userID = (Site::has('has_membership')) ? $this->user->ID : null; |
| | | $integration = JVB()->connect($connection, $userID); |
| | | |
| | | $integration = $this->getServiceUser($connection, $userID); |
| | | if (method_exists($integration, 'renderDefaults')) { |
| | | echo '<h1>Managing '.$integration->title.'</h1>'; |
| | | $integration->renderDefaults(); |
| | | } |
| | | } else { |
| | | ?> |
| | | <section class="item-grid integrations"> |