public static function enable($force_profile = null) { if ($force_profile) { self::$_current_profile = $force_profile; $force_profile::enable_custom_translations(); $force_profile::enable_custom_code(); return; } if (self::$_current_profile) { return; } if (!class_exists('Subsite')) { return; } if (!Subsite::currentSubsiteID()) { return; } $profile = Subsite::currentSubsite()->Profile; if (!$profile) { return; } self::$_current_profile = $profile; $profile::enable_custom_translations(); $profile::enable_custom_code(); }