diff --git a/src/Utils.php b/src/Utils.php index f924ae2..ebebf95 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -34,6 +34,16 @@ use Exception; */ class Utils { + /** + * Check if module is active on current blog + * + * @return bool True on activated + */ + public static function isActive(): bool + { + return !is_null(dcCore::app()->blog) && dcCore::app()->blog->settings->get(My::id())->get('active'); + } + /** * Open cursor. *