You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,9 +13,12 @@ All-in-one Syntax Highlighting solution. Full Gutenberg and Classic Editor integ
13
13
## Description ##
14
14
15
15
Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. Highlighting is powered by the [EnlighterJS](http://enlighterjs.org) javascript library to provide a beautiful code-appearance.
16
+
16
17
Using it can be as simple as adding a new Enlighter Sourcecode block (Gutenberg) and insert the code which you want to highlight: Enlighter takes care of the rest!
18
+
17
19
An easy to use Theme-Customizer is included to modify the build-in themes **without any css knowlegde!**
18
20
It also supports the automatic creation of tab-panes to display code-groups together (useful for multi-language examples - e.g. html+css+js)
21
+
19
22
[Theme Demo](https://enlighterjs.org/Theme.Enlighter.html"EnlighterJS Theme Browser") - [Language Examples](https://enlighterjs.org/Language.Javascript.html"EnlighterJS Language Example")
Copy file name to clipboardExpand all lines: class/CompatibilityModeFilter.php
+28-3Lines changed: 28 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
Plugin URI: http://andidittrich.de/go/enlighterjs
8
8
License: MIT X11-License
9
9
10
-
Copyright (c) 2018, Andi Dittrich
10
+
Copyright (c) 2018-2019, Andi Dittrich
11
11
12
12
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
13
13
@@ -29,7 +29,8 @@ public function __construct($settingsUtil){
All-in-one Syntax Highlighting solution. Full Gutenberg and Classic Editor integration. Graphical theme customizer. Based on EnlighterJS.
12
12
13
13
== Description ==
14
14
15
-
Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. It's build in PHP and uses the Javascript based [EnlighterJS](http://enlighterjs.org) library to provide a beautiful code-appearance.
16
-
Using it can be as simple as selecting an editor style or adding shortcode around your scripts which you want to highlight and Enlighter takes care of the rest. An easy to use Theme-Customizer is included to modify the build-in themes **without any css knowlegde!**
15
+
Enlighter is a free, easy-to-use, syntax highlighting tool for WordPress. Highlighting is powered by the [EnlighterJS](http://enlighterjs.org) javascript library to provide a beautiful code-appearance.
16
+
17
+
Using it can be as simple as adding a new Enlighter Sourcecode block (Gutenberg) and insert the code which you want to highlight: Enlighter takes care of the rest!
18
+
19
+
An easy to use Theme-Customizer is included to modify the build-in themes **without any css knowlegde!**
17
20
It also supports the automatic creation of tab-panes to display code-groups together (useful for multi-language examples - e.g. html+css+js)
* Inline Syntax Highlighting via backtick code (including language specific addon)
60
+
* [Docs and Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_Markdown.md)
61
+
62
+
= Texteditor/Shortcodes (Legacy) =
63
+
64
+
Shortcodes are deprecated and should be used in **text editor mode only** - never use them within Gutenberg Editor or Classic Editor!
43
65
44
-
* [Enlighter Classic Editor Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_VisualEditor.md) - Howto add Code Snippets to your posts and pages with TinyMCE (Classic Editor)
45
-
* [Enlighter Gutenberg Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_GutenbergEditor.md) - Howto add Code Snippets to your posts and pages with Gutenberg
46
-
* [Enlighter Markdown Usage](https://github.com/EnlighterJS/Plugin.WordPress/blob/master/docs/Usage_Markdown.md) - Howto use Markdown fenced codeblocks
* Easy to use Text-Editor mode through the use of Shortcodes and QuickTags
67
+
* Shortcodes within content, comments and widgets
68
+
* Standalone Shortcode-Processor to avoid wpautop filter issues in Text-Editor Mode
48
69
49
70
= Supported Languages (build-in) =
71
+
72
+
In case your language is not available try the **Generic Mode** which covers a lot of programming languages - or request a new language on [GitHub](https://github.com/EnlighterJS/EnlighterJS/issues)
@@ -87,7 +111,7 @@ Click to view Language/Theme Examples
87
111
== Compatibility ==
88
112
89
113
All browsers supported by MooTools (enabled Javascript required) and with HTML5 capabilities for "data-" attributes are compatible with Enlighter. It's possible that it may work with earlier/other browsers.
90
-
Generally Enlighter (which javascript part [EnlighterJS](http://enlighterjs.org) is based on [MooTools Javascript Framework](http://mootools.net/)) should work together with jQuery in [noConflict Mode](http://docs.jquery.com/Using_jQuery_with_Other_Libraries) - when you are using jQuery within your Wordpress Theme/Page you have to take care of it!
114
+
Generally Enlighter (which javascript part [EnlighterJS](https://enlighterjs.org) is based on [MooTools Javascript Framework](http://mootools.net/)) should work together with jQuery in [noConflict Mode](http://docs.jquery.com/Using_jQuery_with_Other_Libraries) - when you are using jQuery within your Wordpress Theme/Page you have to take care of it!
To use Enlighter together with **autooptimize** it's required to exclude the Enlighter resources from autooptimize (EnlighterJS is already optimized!)
186
+
Goto `Settings / Autooptimize / Javascript options / Exclude scripts from Autoptimize` and add `enlighter/resources/` to the end of the comma separated list.
187
+
160
188
= Can i use Enlighter togehter with Crayon ? =
161
189
No, you can't use Enlighter together with the Crayon Syntax highlighter because it may take over the Enlighter elements.
162
190
@@ -208,6 +236,15 @@ In case you found a security issue in this plugin - please write a message **dir
208
236
Write a message to [Andi Dittrich](https://about.andidittrich.com/contact.html) (andi DOT dittrich AT a3non DOT O R G) or open a [New Issue on GitHub](https://github.com/EnlighterJS/Plugin.WordPress/issues)
209
237
== Changelog ==
210
238
239
+
240
+
= 3.10.0 =
241
+
242
+
* Added: french translation - thanks to [regisenguehard on GitHub](https://github.com/EnlighterJS/Plugin.WordPress/pull/144)
243
+
* Added: simplified chinese translation - thanks to [XFY9326 on GitHub](https://github.com/EnlighterJS/Plugin.WordPress/pull/145)
244
+
* Changed: jsdelivr mootools version pointed to `1.6.0`
245
+
* Changed: the DRI detection is now limited to the condition `in_the_loop() && is_main_query()`
246
+
* Bugfix: the experimental DRI feature failed in case `the_content` filter is called multiple times within a theme - thanks to [willstocks-tech on GitHub](https://github.com/EnlighterJS/Plugin.WordPress/pull/153)
<li>Added: automatically transforms legacy Enlighter codeblocks (Classic Editor) to Gutenberg blocks in case the "Convert to Blocks" function is triggered</li>
6
-
<li>Added: Support for jQuery Ajax content (post load) - requested by <ahref="https://github.com/EnlighterJS/Plugin.WordPress/issues/126" data-hovercard-type="issue" data-hovercard-url="/EnlighterJS/Plugin.WordPress/issues/126/hovercard">wassereimer86 on GitHub</a></li>
7
-
<li>Added: Description of possible <ahref="https://github.com/EnlighterJS/Plugin.WordPress/tree/master/docs/PluginNotifications.md">Plugin Notficiations</a></li>
8
-
<li>Changed: moved TinyMCE editor resources (editor plugin) from <code>enlighter/resources/editor</code> to <code>enlighter/resources/tinymce</code></li>
9
-
<li>Changed: moved text editor resources (quicktags from <code>enlighter/resources/editor</code> to <code>enlighter/resources/texteditor</code></li>
10
-
<li>Changed: moved Gutenberg Editor settings to "Visual Editor" Tab</li>
11
-
<li>Changed: <code>data-enlighter-linenumbers</code> attribute is ignored in case it is not set (empty string) to be compatible with the new <ahref="https://github.com/EnlighterJS/Plugin.Gutenberg">Gutenberg Editor Plugin</a> - explicit true/false required</li>
12
-
<li>Changed: Gutenberg Plugin is enabled by default</li>
13
-
<li>Bugfix: TinyMCE footer label may collide with editor content - added additional padding - thanks to <ahref="https://github.com/EnlighterJS/Plugin.WordPress/issues/120" data-hovercard-type="issue" data-hovercard-url="/EnlighterJS/Plugin.WordPress/issues/120/hovercard">JavierSegoviaCordoba on GitHub</a></li>
14
-
<li>Bugfix: On Windows platforms, the environment check throws the error message <code>plugin is located within an invalid path</code> - thanks to <ahref="https://wordpress.org/support/topic/enlighter-plugin-error-the-plugin-is-located-within-an-invalid-path" rel="nofollow">ginaf40 on WordPress.org Forums</a></li>
2
+
<li>Added: french translation - thanks to <ahref="https://github.com/EnlighterJS/Plugin.WordPress/pull/144" data-hovercard-type="pull_request" data-hovercard-url="/EnlighterJS/Plugin.WordPress/pull/144/hovercard">regisenguehard on GitHub</a></li>
3
+
<li>Added: simplified chinese translation - thanks to <ahref="https://github.com/EnlighterJS/Plugin.WordPress/pull/145" data-hovercard-type="pull_request" data-hovercard-url="/EnlighterJS/Plugin.WordPress/pull/145/hovercard">XFY9326 on GitHub</a></li>
4
+
<li>Changed: jsdelivr mootools version pointed to <code>1.6.0</code></li>
5
+
<li>Changed: the DRI detection is now limited to the condition <code>in_the_loop() && is_main_query()</code></li>
6
+
<li>Bugfix: the experimental DRI feature failed in case <code>the_content</code> filter is called multiple times within a theme - thanks to <ahref="https://github.com/EnlighterJS/Plugin.WordPress/pull/153" data-hovercard-type="pull_request" data-hovercard-url="/EnlighterJS/Plugin.WordPress/pull/153/hovercard">willstocks-tech on GitHub</a></li>
0 commit comments