booted) { return; } $this->booted = true; if ((string) get_option('pcwp_schema_version', '') !== Schema::VERSION) { Schema::install(); } $this->events = new WpEventRepository(); $materializer = new \ProCalendarWP\Recurrence\SeriesMaterializer(new \ProCalendarWP\Recurrence\Rfc5545Engine()); foreach ( [ new PostTypes(), new \ProCalendarWP\Recurrence\SeriesMeta(), $materializer, new \ProCalendarWP\Recurrence\SeriesController($materializer), new \ProCalendarWP\Recurrence\SeriesEditor(), new \ProCalendarWP\Events\CategoryColors(), new \ProCalendarWP\Maps\Maps(), new \ProCalendarWP\Events\ScheduleStorage(), new EventSaver(), new EventMetaBoxes(), new SettingsPage(), new ManualImporter(), new EventsController($this->events), new EntitiesController(), new QueryIntegration(), new IcsController($this->events), new Blocks($this->events), new Shortcodes($this->events), new LegacyWidgets(), new ArchiveTemplate(), new ViewAssets(), new JsonLd($this->events), new FreemiusLicensing(), new \ProCalendarWP\Rsvp\RsvpModule(), new EventTemplates(), new \ProCalendarWP\Views\DayLanding(), new \ProCalendarWP\Seo\CalendarSeo(), new \ProCalendarWP\Events\NextDate(), new \ProCalendarWP\Events\EventVisibility(), ] as $module ) { $module->register(); } $premium = PCWP_PATH . 'premium/bootstrap.php'; if (is_readable($premium)) { require_once $premium; do_action('pcwp_register_premium_modules', $this); } do_action('pcwp_loaded', $this); } public function events(): EventRepositoryInterface { if ($this->events === null) { $this->events = new WpEventRepository(); } return $this->events; } public function isPremium(): bool { $freemius = function_exists('pcwp_fs') ? pcwp_fs() : null; if (is_object($freemius) && method_exists($freemius, 'is_premium')) { return (bool) $freemius->is_premium(); } return is_readable(PCWP_PATH . 'premium/bootstrap.php'); } }