Skip to content

Commit e5592d9

Browse files
committed
applied config changes to EditorConfig; fixed #293
1 parent a571838 commit e5592d9

File tree

6 files changed

+16
-44
lines changed

6 files changed

+16
-44
lines changed

.wp-skeleton.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"slug": "enlighter",
33
"name": "Enlighter",
44
"namespace": "Enlighter",
5-
"version": "4.3.0",
5+
"version": "4.3.1",
66
"license": "GPL-2.0",
77
"licenseFile": "LICENSE.txt",
88
"constants": {},

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog ##
22

3+
### 4.3.1 ###
4+
5+
* Bugfix: due to changes in the initialization code in `4.3.0` the global config couldn't be retrieved by the editing plugins
6+
37
### 4.3.0 ###
48

59
* Added: EnlighterJS `v3.4.0`

Enlighter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Enlighter - Customizable Syntax Highlighter
44
Plugin URI: https://enlighterjs.org
55
Description: all-in-one syntax highlighting solution
6-
Version: 4.3.0
6+
Version: 4.3.1
77
Author: Andi Dittrich
88
Author URI: https://andidittrich.com
99
License: GPL-2.0
@@ -16,7 +16,7 @@
1616
// Plugin Bootstrap Operation
1717
// AUTO GENERATED CODE - DO NOT EDIT !!!
1818
define('ENLIGHTER_INIT', true);
19-
define('ENLIGHTER_VERSION', '4.3.0');
19+
define('ENLIGHTER_VERSION', '4.3.1');
2020
define('ENLIGHTER_WPSKLTN_VERSION', '0.24.0');
2121
define('ENLIGHTER_PHP_VERSION', '5.6');
2222
define('ENLIGHTER_PLUGIN_TITLE', 'Enlighter - Customizable Syntax Highlighter');

modules/editor/EditorConfig.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@ public function getEditorConfigCode(){
3232

3333
// filtered themes
3434
$themes = apply_filters('enlighter_editor_themes', $this->_themeManager->getThemes());
35+
36+
// retrieve enlighterjs default config
37+
$enlighterjsConfig = $this->_enlighterjs->getConfig();
3538

3639
// create config object
3740
$config = array(
3841
'languages' => $languages,
3942
'themes' => $themes,
40-
'config' => $this->_enlighterjs->getConfig(),
43+
'config' => $enlighterjsConfig['options'],
4144
'tinymce' => array(
4245
'tabIndentation' => $this->_config['tinymce-tabindentation'],
4346
'keyboardShortcuts' => $this->_config['tinymce-keyboardshortcuts']

modules/skltn/Plugin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function showUpgradeAvailabilityNotification($currentPluginMetadata, $new
271271
public function showUpgradeMessage(){
272272
// styling
273273
echo '<div class="notice notice-success is-dismissible"><p>';
274-
echo '<strong>Enlighter Plugin Upgrade:</strong> The Plugin has been upgraded to <strong>4.3.0</strong>';
274+
echo '<strong>Enlighter Plugin Upgrade:</strong> The Plugin has been upgraded to <strong>4.3.1</strong>';
275275
echo '</p></div>';
276276
}
277277

@@ -300,14 +300,14 @@ public static function run($pluginName){
300300
// plugin installed ?
301301
if ($version == '0.0.0'){
302302
// store new version
303-
update_option('enlighter-version', '4.3.0');
303+
update_option('enlighter-version', '4.3.1');
304304

305305
// plugin upgraded ?
306-
}else if (version_compare('4.3.0', $version, '>')){
306+
}else if (version_compare('4.3.1', $version, '>')){
307307
// run upgrade hook
308308
if ($i->_wp_plugin_upgrade($version)){
309309
// store new version
310-
update_option('enlighter-version', '4.3.0');
310+
update_option('enlighter-version', '4.3.1');
311311

312312
// set flag (string!)
313313
update_option('enlighter-upgrade', 'true');

views/admin/about/Changelog.html

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,3 @@
11
<ul>
2-
<li>Added: EnlighterJS <code>v3.4.0</code></li>
3-
<li>Added: EnlighterJS Theme-Customizer <code>v2.3.0</code></li>
4-
<li>Added: compatibility for <code>async/defer</code> script loading (configuration code is merged with the library) (optional)- feature requested <a href="https://wordpress.org/support/topic/enlighterjs-resources-not-loaded-yet/">on WordPress.org Forums</a></li>
5-
<li>Added: javascript based dynamic-resource-invocation to load the EnlighterJS assets dynamically when needed (client side)</li>
6-
<li>Added: dri compatibility for bbpress and dynamic content (jquery load, jetpack infinity scroll)</li>
7-
<li>Added: keyword <code>k11</code> for annotations</li>
8-
<li>Added: keyword <code>x16</code> for css element selectors</li>
9-
<li>Added: contextual keywords to csharp - thanks to <a href="https://github.com/EnlighterJS/EnlighterJS/pull/112">mabako on GitHub</a></li>
10-
<li>Added: kotlin string template support</li>
11-
<li>Added: <code>r</code> language support (covered by generic ruleset)</li>
12-
<li>Added: MikroTik <code>RouterOS</code> language support (ros/mikrotik/switchos/routeros/mt)</li>
13-
<li>Added: pound style comment support to <code>php</code></li>
14-
<li>Changed: renamed the &quot;raw code&quot; language label to &quot;Plain text&quot;</li>
15-
<li>Changed: EnlighterJS library (js) is loaded via cache file <code>cache/enlighterjs.min.js</code></li>
16-
<li>Changed: js/css cache file generation is bound to <code>enqueue</code> hook (performance)</li>
17-
<li>Changed: <code>wp-skltn</code> library updated to <strong>0.24.0</strong></li>
18-
<li>Changed: for compatibility reasons, the language-shortcodes are disabled by default (this only affects new installations)</li>
19-
<li>Changed: full semantic versioning tag is used to display the plugin version (may used by additional tools) - thanks to <a href="https://github.com/EnlighterJS/Plugin.WordPress/issues/262">roy-bongers on GitHub</a></li>
20-
<li>Changed: theme cache is only reloaded on Enlighter settings pages (performance) - thanks to <a href="https://wordpress.org/support/topic/problem-with-_transient_enlighter_userthemes-option/">gdragon on Wordpress forums</a></li>
21-
<li>Changed: EnlighterJS::getConfig has been changed to multidimension object to allow additional payloads (this also affects the initialization code)</li>
22-
<li>Changed: css selector fragment highlighting is limited to the selector itself</li>
23-
<li>Changed: enhanced css unit parsing</li>
24-
<li>Changed: <code>java</code>, <code>scala</code>, <code>cpp</code> annotation token changed to <code>k11</code></li>
25-
<li>Changed: added token <code>k11</code> to themes</li>
26-
<li>Changed: moved generic highlighting rules to <code>lang/rulesets/generic</code></li>
27-
<li>Changed: <code>ampersandCleanup</code> is performed after html escape sequences to eliminate issues related to double unquoting #109</li>
28-
<li>Changed: toggle raw code label to &quot;Plain text&quot;</li>
29-
<li>Changed: allowed utf8 characters in <code>php</code> variable and function names (side effect of the php parser)</li>
30-
<li>Removed: <code>EnlighterJS::dequeue</code> function (deprecated due to new DRI implementation)</li>
31-
<li>Bugfix: vhdl single bit highlighting collided with attribute syntax - thanks to <a href="https://github.com/EnlighterJS/EnlighterJS/issues/106">tyriun on GitHub</a></li>
32-
<li>Bugfix: css classnames/ids with hyphens were not recognized</li>
33-
<li>Bugfix: XML mixins of single/double quotes in attributes failed #108</li>
34-
<li>Bugfix: dot char within XML attribute names not recognized</li>
35-
<li>Bugfix: kotlin raw string where not correctly parsed (wrong rule priority)</li>
36-
<li>Bugfix: highlighting color of <code>classic</code> theme not applied due to invalid selectors - thanks to <a href="https://github.com/EnlighterJS/EnlighterJS/issues/117">woolseyj on GitHub</a></li>
37-
<li>Bugfix: EnlighterJS codeblock css selectors cannot contain quotes due to initialization code sanitizing (replace with serialized object)</li>
2+
<li>Bugfix: due to changes in the initialization code in <code>4.3.0</code> the global config couldn&#39;t be retrieved by the editing plugins</li>
383
</ul>

0 commit comments

Comments
 (0)