File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ ) and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
7+ ## 5.2.1 - 2024-11-21
8+
9+ ### Changed
10+ - Moved plugin registrations depending on Craft's initialization into onInit() method
11+
712## 5.2.0 - 2024-07-23
813
914### Added
Original file line number Diff line number Diff line change @@ -97,19 +97,18 @@ public function init(): void
9797 ]);
9898
9999 $ this ->registerPermissions ();
100-
101- if (Craft::$ app ->request ->isCpRequest && Craft::$ app ->user ->getIdentity ()) {
102- OhDearAsset::registerLangFile ();
103- $ this ->registerFrontendPermissions ();
104- $ this ->registerWidgets ();
105- $ this ->registerUtilityTypes ();
106- }
107-
100+ $ this ->registerUtilityTypes ();
101+ $ this ->registerWidgets ();
108102 $ this ->registerUrlRules ();
109-
110103 $ this ->registerCpRoutes ();
111-
112104 $ this ->registerEntryEditRedirectOverride ();
105+
106+ Craft::$ app ->onInit (function () {
107+ if (Craft::$ app ->request ->isCpRequest && Craft::$ app ->user ->getIdentity ()) {
108+ $ this ->registerFrontendPermissions ();
109+ OhDearAsset::registerLangFile ();
110+ }
111+ });
113112 }
114113
115114 protected function createSettingsModel (): ?Model
You can’t perform that action at this time.
0 commit comments