Version 4.0.3

April 25, 2023

Fixed

  • Fixed a bug where a naked hex string returned from the Color field would produce invalid CSS. (#15)

Version 4.0.2

July 28, 2022

Fixed

  • Fixed some additional errors that would occur if the CRAFT_ENVIRONMENT constant was not defined. (#12)

Deprecated

  • 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!)

Version 4.0.1

July 11, 2022

Fixed

  • Fixed an error that occurred when instantiating a Settings model, if the CRAFT_ENVIRONMENT constant was not defined.

Version 4.0.0

April 27, 2022

Improved

  • Environment Label is ready for Craft 4!

Changed

  • 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

  • Deprecated $textColor and $labelColor. (These styles will probably be specified via custom CSS in future versions.)
  • Deprecated $prefixText, getPrefixText(), $suffixText, and getSuffixText(). (These will probably be consolidated in future versions, so that the text of the label only includes $labelText.)

Removed

  • Removed EnvironmentLabel::$plugin static accessor; use getInstance() instead.

Version 3.2.0

January 6, 2019

Added

  • 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.

Version 3.1.5

November 2, 2018

Fixed

  • 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)

Version 3.1.4

June 5, 2018

Fixed

  • Replaced broken URL to docs.

Version 3.1.3

March 22, 2018

Fixed

  • Updated the docs and example config file to reference the correct settings handles for prefixText and suffixText.

Version 3.1.2

March 8, 2018

Fixed

  • Removed a slightly overzealous typehint that causes an error in PHP 7.0 (since the void return type wasn't added until 7.1).

Version 3.1.1

December 31, 2017

Added

  • The environmentLabel Twig global now provides access directly to the Label service.

Fixed

  • 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

  • Removed the EnvironmentLabelTwigExtension in favor of a global pass-through to the Label service.

Version 3.0.0

December 25, 2017

Added

  • Environment Label is ready for Craft 3!