newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version')); return static::$init; } public static function process(): bool { if (!static::$init) { return false; } // nullsafe PHP < 8.0 if (is_null(dcCore::app()->blog)) { return false; } try { $s = dcCore::app()->blog->settings->get(My::id()); $s->put( 'flag', false, 'boolean', 'Construction blog flag', false, true ); $s->put( 'allowed_ip', json_encode(['127.0.0.1']), 'string', 'Construction blog allowed ip', false, true ); $s->put( 'title', __('Work in progress'), 'string', 'Construction blog title', false, true ); $s->put( 'message', __('

The blog is currently under construction.

'), 'string', 'Construction blog message', false, true ); $s->put( 'extra_urls', json_encode([]), 'string', 'Construction blog message', false, true ); return true; } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } return true; } }