lockIcon
property replaced by licenseOnly
Strapi 5 adds a new licenseOnly
boolean property to pass in the addMenuLink
, in the addSettingsLink
and in the addSettingsLinks
actions. Adding this property shows a lightning ⚡️ icon near the link, and indicates paid features.
A similar result can be achieved in Strapi v4 by adding the lockIcon
property.
This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.
🔌 Is this breaking change affecting plugins? | Yes |
---|
🤖 Is this breaking change automatically handled by a codemod? | No |
---|
Breaking change description
In Strapi v4
- The
lockIcon
property is used in theaddMenuLink()
,addSettingsLink
, andaddSettingsLinks()
methods of the Admin Panel API. - The property adds a lock icon.
In Strapi 5
- The
licenseOnly
property is used in theaddMenuLink()
,addSettingsLink
, andaddSettingsLinks()
methods of the Admin Panel API. - The property adds a lightning icon ⚡️.
Migration
Notes
-
Passing
licenseOnly: true
will add a lightning icon ⚡️, so that:-
a menu icon will look like the following:
-
a settings menu item will look like the following:
-
-
Additional information and examples on how to use the
licenseOnly
property can be found in theaddMenuLink()
,addSettingsLink()
, andaddSettingsLinks()
methods sections of the Admin Panel API documentation.
Manual migration
If your custom Strapi v4 code uses the lockIcon
property to highlight a paid feature that requires an Enterprise license, search and replace lockIcon: true
by licenseOnly: true
.