The format of this file is based on "Keep a Changelog". This project adheres to Semantic Versioning. Version numbers follow the pattern: MAJOR.FEATURE.BUGFIX
- Environment Label is ready for Craft 5!
- Removed
getJs()
. The plugin no longer registers any info in JavaScript.
- Fixed a bug where a naked hex string returned from the Color field would produce invalid CSS. (#15)
- Fixed some additional errors that would occur if the
CRAFT_ENVIRONMENT
constant was not defined. (#12)
- Deprecated
getJs()
and slated JS features for removal in 5.x, because they're not actually very useful. (Please open an issue if you're using these features!)
- Fixed an error that occurred when instantiating a
Settings
model, if theCRAFT_ENVIRONMENT
constant was not defined.
- Environment Label is ready for Craft 4!
- Fully typed
Settings
properties. - Moved
Label
component to the root namespace. - Moved
Settings
model to the root namespace. - Moved
TwigExtension
to the root namespace.
- Deprecated
$textColor
and$labelColor
. (These styles will probably be specified via custom CSS in future versions.) - Deprecated
$prefixText
,getPrefixText()
,$suffixText
, andgetSuffixText()
. (These will probably be consolidated in future versions, so that the text of the label only includes$labelText
.)
- Removed
EnvironmentLabel::$plugin
static accessor; usegetInstance()
instead.
- Added compatibility with new (Craft 3.4+) control panel layout. (#8)
- Added the
targetSelector
setting, which optionally overrides the CSS selector for the label banner.
- Fixed order-of-loading conflicts that could generate an error when Environment Label tried to add a Twig global. (#6)
- Add
craftcms/cms
3.0 as a requirement. (Required by plugin store)
- Replaced broken URL to docs.
- Updated the docs and example config file to reference the correct settings handles for
prefixText
andsuffixText
.
- Removed a slightly overzealous typehint that causes an error in PHP 7.0 (since the
void
return type wasn't added until 7.1).
- The
environmentLabel
Twig global now provides access directly to theLabel
service.
- The label text is now rendered later in the request (in response to the View's
BEFORE_RENDER_PAGE_TEMPLATE
event, rather than during the plugin initialization). This allows other plugins to register Twig extensions before we first use Twig to render the label text.
- Removed the
EnvironmentLabelTwigExtension
in favor of a global pass-through to the Label service.
- Environment Label is ready for Craft 3!