Jake Vanderwerf
2026-05-01 48721c85ebcfa973ee81719d2467ca80e4253dc9
base/Site.php
@@ -14,11 +14,21 @@
   protected static Membership $membershipConfig;
   protected static Site $instance;
   protected static string $icons = 'regular';
   /**
    * @var array Dashboard  config
    */
   protected static string $dashboardTitle;
   /**
    * @var bool $is_directory Whether this is a membership directory
    */
   protected static bool $is_directory = false;
   protected static string $directory_singular;
   protected static string $directory_plural;
   /**
    * @var bool Whether to add a help menu to the header
    */
   protected static bool $help_menu = false;
   /**
    * @var bool $has_membership Whether this site has membership
    */
@@ -31,6 +41,7 @@
    * @var bool $referrals Whether to implement a referral system, with rewards
    */
   protected static bool $referrals = false;
   protected static string $defaultReferralRole = BASE.'client';
   /**
    * @var bool $magic_link Whether users can login without a password
    */
@@ -200,35 +211,41 @@
      }
      return self::$membershipConfig;
   }
   public function setDashboardTitle(string $title):void
   {
      self::$dashboardTitle = $title;
   }
   public static function dashboardTitle():bool|string
   {
      return self::$dashboardTitle ?? false;
   }
   public function setDirectorySingular(string $title):void
   {
      self::$directory_singular = $title;
   }
   public static function getDirectorySingular():bool|string
   {
      return self::$directory_singular ?? false;
   }
   public function setDirectoryPlural(string $title):void
   {
      self::$directory_plural = $title;
   }
   public static function getDirectoryPlural():bool|string
   {
      return self::$directory_plural ?? false;
   }
   public static function setDefaultReferralRole(string $role):void
   {
      self::$defaultReferralRole = $role;
   }
   public static function getDefaultReferralRole():string
   {
      return self::$defaultReferralRole;
   }
}
$defaults = [
   'icons'               => 'light',
   'directory'        => false,        //as in, a membership directory
   'membership'      => false,
   'has_map'             => false,        //TODO: migrate to integrations['gmb']
   'dashboard'           => false,
   'support'         => false,
   'feed_block'      => false,
   'email_notifications' => false,
   'integrations'  => [
      'bluesky'     => false,
      'cloudflare'  => false,
      'facebook'    => false,
      'maps'        => false,
      'gmb'         => false,
      'helcim'      => false,
      'instagram'   => false,
      'square'      => false,
      'umami'       => false,
   ],
   'is_restaurant'       => false,
   'limit_hours'         => false,
   'enthusiast'          => false,
   'favourites'          => false,           //optional flag to allow enthusiasts, but not favourites
];
$jvb_site = array_merge($defaults, apply_filters('jvb_site', []));
define('JVB_SITE', $jvb_site);