Skip to content

Latest commit

 

History

History
135 lines (95 loc) · 6.92 KB

File metadata and controls

135 lines (95 loc) · 6.92 KB

Upgrade Notice - Enlighter WordPress Plugin v4

Enlighter v4 has arrived - including a new highlighting engine, languages and theme.

Sadly..there is no full-automatic upgrade path available caused by its new architecture. Custom themes, css modifications and most of the settings have to be manually converted!

Please take some time for testing before applying the v4 release to your website!

I apologize for the inconvenience.

Content

Related

System requirements

  • WordPress 5.0
  • PHP 7.0, including json functions
  • Modern webbrowser with enabled Javascript (required for highlighting)
  • Accessable cache directory (/wp-content/plugins/enlighter/cache/)

Content/Codeblocks

All of your Enlighter codeblocks within post/pages, shortcodes and markdown blocks will continue to work without any changes!

The "markup" structure of the editing plugins didn't changed and you can stil use your old post/pages with the new Enlighter version - it is 100% compatible

Old shortcodes without language identifier

Old Enlighter versions allowed you to create shortcodes without a language attribute set - the plugin was using the "default language" setting. For compatibility reasons this "fallback behaviour" of EnlighterJS can be controlled under Enlighter -> Options -> Advanced -> EnlighterJS - it's only required for legacy shortcodes created in previous plugin versions.

Theme Customizer

The whole plugin architecture and especially the underlying highlight engine EnlighterJS v3 has been re-created from scratch. It contains a complete different highlighting structure based on syntactic tokens Therefore the previous configuration of the existing Theme Customizer cannot be converted to the new format! There is no relation between the systems.

Custom Themes / CSS Modifications

In case you've created custom themes or applied some css changes to the EnlighterJS v2 themes, this changes will be lost!

The new EnlighterJS v3 engine includes a completely different html markup and css structure rules which didn't have any similarities with the previous versions.

Plugin settings/options

Mostly all plugin settings have changed - therefore it was not possible to retain these options during the upgrade. Only the core options have been copied.

Please take some time to look into the settings page and adjust them.

Webfonts

The webfonts loader (Google Fonts) has been removed.

Since EnlighterJS v3 is using a native font stack (like bootstrap) it is not longer required do display code. If you want to include custom fonts please do it on your own.

Cleanup database

The legacy Enlighter versions uses a lot of options which are stored in a seperate database row each. Thanks to the new plugin architecture, all options are stored in a single, serialized object. To cleanup your database, just run the following query to delete all Enlighter v3 settings

Note: remember to modify the wp_ installation prefix to match your environment!

DELETE FROM `wp_options` WHERE `option_name` LIKE 'enlighter-%' AND `option_name` NOT IN ('enlighter-version', 'enlighter-options', 'enlighter-customizer', 'enlighter-cache-hash');

Missing Features

  • Preview mode of the theme customizer

Downgrade

In case something went wrong during the upgrade you can downgrade to Enlighter v3.11 without any problems - the settings are stil in the database.

  1. Disable the Enlighter Plugin
  2. Remove the Enlighter Plugin
  3. Download the v3.11 release from wordpress.org
  4. Upload the content of the .zip file to the /wp-content/plugins/enlighter directory (has to be created manually)
  5. Activate the plugin through the ‘Plugins’ menu in WordPress

Please create a bug report on GitHub

Major Enhancements

EnlighterJS v3

This changes are related to the EnlighterJS v3 library (highlighting engine).

The new version works standlone without any framework (no MooTools, no jQuery, no React) using vanilla javascript. This will avoid mostly all compatibility issues with third party plugins like page builders or javascript based addons.

  • Replaced MooTools Framework by native code - requires IE >= 10
  • New Tokenizer Engine including a two stage analyzer
  • Excessive Performance Optimizations
  • Added: ECMA6 Support to Javascript Engine
  • Added: Copy to clipboard button
  • Added: horizontal scroll option
  • The complete javascript code is capsuled within a closure and is only exposed by the window.EnlighterJS object
  • Highlighting can be removed at any time (elements will be removed from DOM)
  • Removed the last pieces of Lighter.js codebase
  • NEW Highlighting Engines - every language support file has been rewritten
  • ES6 Syntax using babeljs as transpiler
  • Library is build and optimized with rollup.js
  • UI components build with jsx - but without native react
  • All Themes are transformed to LESS

Enlighter WordPress Plugin v4

  • Added: Crayon compatibility/migration mode
  • Added: docker based development mode
  • Changed: WP-Skeleton is used as Plugin Backend Framework
  • Changed: All settings are stored in serialized form in enlighter-options instead of single options
  • Changed: moved settings page to top-level menu
  • Changed: new settings page
  • Changed: sessionStorage is used to store the current active tab instead of cookies
  • Changed: updated the UI components
  • Changed: wp-skltn library updated to 0.23.0 - MPL 2.0 License
  • Bugfix: colorpicker sets wrong foreground color which caused unreadable input fields (color lightness calculation)
  • Cleaned up the internal Plugin Structure
  • Removed: jquery-cookie dependency
  • Removed: MooTools framework
  • Removed: Lighter.js legacy themes (Git, Mocha, MooTools, Panic, Tutti, Twilight)
  • Removed: most keyword lists from language files (direct regular expressions are used)