<?php
declare(strict_types=1);
namespace MeinWeimar;
final class Plugin
{
private static bool $booted = false;
public static function boot(): void
{
if (self::$booted) {
return;
}
self::$booted = true;
load_plugin_textdomain('meinweimar-core', false, dirname(plugin_basename(FILE)) . '/languages');
ContentTypes::hooks();
MapMarkers::hooks();
AdminEditor::hooks();
Settings::hooks();
RestApi::hooks();
Seo::hooks();
Cache::hooks();
Safety::hooks();
AdminModeration::hooks();
AccountApi::hooks();
Favorites::hooks();
Claims::hooks();
Messaging::hooks();
ImageSuggestions::hooks();
Notifications::hooks();
Renderer::hooks();
Templates::hooks();
Shortcodes::hooks();
ElementorAdapter::hooks();
}
public static function activate(): void
{
ContentTypes::register();
ContentTypes::seed_place_categories();
ContentTypes::seed_classified_categories();
ContentTypes::seed_job_categories();
ContentTypes::seed_event_categories();
ContentTypes::seed_property_categories();
Permissions::install();
Safety::install();
Settings::install_defaults();
Favorites::install();
Claims::install();
Messaging::install();
ImageSuggestions::install();
Notifications::install();
flush_rewrite_rules();
}
public static function deactivate(): void
{
flush_rewrite_rules();
}
}
