Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 1f198b2

Browse files
author
Alexandre Germain
committed
Fixes in style editor
1 parent 0fa53a1 commit 1f198b2

File tree

8 files changed

+97
-90
lines changed

8 files changed

+97
-90
lines changed

Gruntfile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ module.exports = function gruntInit( grunt ) {
9191
headers: {
9292
src: [
9393
'tests/**/*.js',
94-
'js/**/*.js',
95-
'!js/**/*.min.js',
94+
'js/src/**/*.js',
9695
'less/**/*.less',
9796
'class/**/*.php',
9897
'templates/src/*.php',
@@ -398,6 +397,9 @@ module.exports = function gruntInit( grunt ) {
398397
version = semver.inc( currentVersion, grunt.config( 'bump.increment' ));
399398
grunt.log.ok( 'Bumping up ' + grunt.config( 'bump.increment' ).yellow + ' version number.' );
400399
}
400+
if(version == null){
401+
version = currentVersion;
402+
}
401403

402404

403405
if ( _( grunt.config( 'bump.files' )).includes( 'package' )) {

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
**Tags:** tooltip, dictionary, glossary, appendix, technical terms, popup, tooltips, infobulle, definition, definitions, définition, définitions, dictionnaire, dictionnaires, dictionnaries, precision, information, informations, widget, widgets, shortocde, shortcodes, images, image, comment, comments, index, dictionnary, ajax, custom post type, post type, documentation, database, help, jquery, quote
77
**Requires at least:** 3.3
88
**Tested up to:** 4.8
9-
**Stable tag:** 3.0.0
9+
**Stable tag:** 3.0.1
1010
**License:** GPLv3
1111

1212
Create beautiful tooltips for descriptions or glossary terms, easily
@@ -78,6 +78,10 @@ For bug repports or unexpected behaviors, please see the dedicated [WordPress su
7878

7979
## Changelog ##
8080

81+
### 3.0.1 ###
82+
* FIX Fatal error in Resource management (see [the forum thread](https://wordpress.org/support/topic/php-fatal-error-115/))
83+
* FIX Theme Editor
84+
8185
### 3.0.0 ###
8286
* NEW Exclude glossary terms from search
8387
* NEW Automated tests, linting, docs, etc etc

class/class-admin.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ public function options() {
416416

417417
$backbone->enqueue_resources( array(
418418
'ithoughts_tooltip_glossary-admin',
419-
'ithoughts_tooltip_glossary-glossary-css',
419+
'ithoughts_tooltip_glossary-css',
420420
'ithoughts_tooltip_glossary-qtip-css',
421-
'ithoughts_tooltip_glossary-customthemes'
422421
) );
423422

424423
/* Add required scripts for WordPress Spoilers (AKA PostBox) */
425424
wp_enqueue_script( 'postbox' );
426425
wp_enqueue_script( 'post' );
426+
wp_enqueue_style( 'ithoughts_tooltip_glossary-customthemes' );
427427

428428
$optionsInputs = array(
429429
'termlinkopt' => TB::generate_input_select(
@@ -1348,15 +1348,12 @@ public function theme_editor() {
13481348
/* Add required resources for wpColorPicker */
13491349
$backbone->enqueue_resources( array(
13501350
'ithoughts_tooltip_glossary-styleeditor',
1351-
'ithoughts_tooltip_glossary-colorpicker',
1351+
'ithoughts_tooltip_glossary-admin',
13521352
'ithoughts_tooltip_glossary-qtip-css',
13531353
) );
13541354
wp_enqueue_style('ithoughts_tooltip_glossary-customthemes');
13551355

13561356
wp_enqueue_style( 'wp-color-picker' );
1357-
$backbone->enqueue_resource( 'ithoughts_tooltip_glossary-gradx' );
1358-
$backbone->enqueue_resource( 'ithoughts_tooltip_glossary-admin' );
1359-
$backbone->enqueue_resource( 'ithoughts_tooltip_glossary-customthemes' );
13601357

13611358
$themeInfos = $this->get_custom_theme_infos();
13621359
$themeEditorEnabled = is_writable( $themeInfos['absdir'] . '/' . ($themedata['file'] ? $themedata['file'] : '') );
@@ -1414,7 +1411,7 @@ public function theme_editor() {
14141411
}
14151412

14161413
private function loadtheme( $themename = null ) {
1417-
$defaultContent = '.qtip{ /* Global tip style (eg: borders, shadow, etc) */
1414+
$defaultContent = '&.qtip{ /* Global tip style (eg: borders, shadow, etc) */
14181415
}
14191416
.qtip-titlebar{ /* Title specific rules */
14201417
}
@@ -1449,7 +1446,7 @@ private function loadtheme( $themename = null ) {
14491446

14501447
$content = file_get_contents( $themeInfos['absdir'] . '/' . $file );
14511448

1452-
$matchHeadRegex = "/^\\.qtip-$reformatedThemeName\\s*{[\\n\\s]*&/";
1449+
$matchHeadRegex = "/^\\.qtip-$reformatedThemeName\\s*{[\\n\\s]*/";
14531450
$splittedHead = false;
14541451
if ( preg_match( $matchHeadRegex, $content ) === 1 ) { // If normal header
14551452
if (
@@ -1538,7 +1535,7 @@ private function theme_to_less( $theme ) {
15381535
if ( isset( $theme['content'] ) && $theme['content'] ) {
15391536
if ( isset( $theme['splittedHead'] ) && $theme['splittedHead'] == 'yes' ) {
15401537
$content .= ".qtip-$theme_name{" . PHP_EOL;
1541-
$content .= '&' . $theme['content'] . PHP_EOL . '}';
1538+
$content .= $theme['content'] . PHP_EOL . '}';
15421539
} else {
15431540
$content = $theme['content'];
15441541
}
@@ -1547,7 +1544,7 @@ private function theme_to_less( $theme ) {
15471544
}
15481545

15491546
$ret = array(
1550-
'less' => $this->auto_indent( $content ),
1547+
'less' => preg_replace('/\\\/', '', $this->auto_indent( $content )),
15511548
'theme_name' => $theme_name,
15521549
);
15531550
return $ret;

class/class-backbone.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public function declare_resources(){
289289
)
290290
) );
291291
$this->declare_resource( 'ithoughts_tooltip_glossary-atoz', 'js/dist/ithoughts_tt_gl-atoz.js', array('jquery', 'ithoughts-core-v5'));
292-
// $this->declare_resource( 'ithoughts_tooltip_glossary-list', 'js/dist/ithoughts_tt_gl-glossary-list.js', array('jquery', 'ithoughts-core-v5'));
292+
// $this->declare_resource( 'ithoughts_tooltip_glossary-list', 'js/dist/ithoughts_tt_gl-glossary-list.js', array('jquery', 'ithoughts-core-v5'));
293293

294294
// Generate all Style resources
295295
$this->declare_resource( 'ithoughts_tooltip_glossary-css', 'css/ithoughts_tt_gl.min.css');
@@ -425,8 +425,8 @@ public function wp_enqueue_styles(){
425425
'ithoughts_tooltip_glossary-qtip-css'
426426
) );
427427

428-
if(isset($this->resources[ 'ithoughts_tooltip_glossary-customthemes' ])){
429-
$this->enqueue_resource( 'ithoughts_tooltip_glossary-customthemes' );
428+
if(isset($this->options["custom_styles_path"])){
429+
wp_enqueue_style( 'ithoughts_tooltip_glossary-customthemes' );
430430
}
431431
}
432432
public function wp_enqueue_scripts_hight_priority(){

ithoughts_tooltip_glossary.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
* @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3
99
* @package ithoughts-tooltip-glossary
1010
*
11-
* @version 2.8.0
11+
* @version 3.0.1
1212
*/
1313

1414

1515
/*
1616
Plugin Name: iThoughts Tooltip Glossary
1717
Plugin URI: http://www.gerkindevelopment.net/en/portfolio/ithoughts-tooltip-glossary/
1818
Description: Create beautiful tooltips for descriptions or glossary terms easily
19-
Version: 3.0.0
19+
Version: 3.0.1
2020
Author: Gerkin
2121
License: GPLv3
2222
Text Domain: ithoughts-tooltip-glossary

package.json

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,88 +3,88 @@
33
"version": "3.0.1",
44
"description": "Create beautiful tooltips for descriptions or glossary terms easily",
55
"directories": {
6-
"test": "test"
6+
"test": "test"
77
},
88
"scripts": {
9-
"test": "mocha test/unit-test.js"
9+
"test": "mocha test/unit-test.js"
1010
},
1111
"repository": {
12-
"type": "git",
13-
"url": "git+https://github.com/iThoughts-Informatique/iThoughts-Tooltip-Glossary.git"
12+
"type": "git",
13+
"url": "git+https://github.com/iThoughts-Informatique/iThoughts-Tooltip-Glossary.git"
1414
},
1515
"keywords": [
16-
"wordpress",
17-
"tooltip",
18-
"dictionary",
19-
"glossary",
20-
"appendix",
21-
"technical terms",
22-
"popup",
23-
"tooltips",
24-
"infobulle",
25-
"definition",
26-
"definitions",
27-
"définition",
28-
"définitions",
29-
"dictionnaire",
30-
"dictionnaires",
31-
"dictionnaries",
32-
"precision",
33-
"information",
34-
"informations",
35-
"widget",
36-
"widgets",
37-
"shortocde",
38-
"shortcodes",
39-
"images",
40-
"image",
41-
"comment",
42-
"comments"
16+
"wordpress",
17+
"tooltip",
18+
"dictionary",
19+
"glossary",
20+
"appendix",
21+
"technical terms",
22+
"popup",
23+
"tooltips",
24+
"infobulle",
25+
"definition",
26+
"definitions",
27+
"définition",
28+
"définitions",
29+
"dictionnaire",
30+
"dictionnaires",
31+
"dictionnaries",
32+
"precision",
33+
"information",
34+
"informations",
35+
"widget",
36+
"widgets",
37+
"shortocde",
38+
"shortcodes",
39+
"images",
40+
"image",
41+
"comment",
42+
"comments"
4343
],
4444
"author": {
45-
"name": "Alexandre Germain",
46-
"homepage": "http://www.gerkindevelopment.net/",
47-
"email": "agermain@gerkindevelopment.net",
48-
"role": "Developer"
45+
"name": "Alexandre Germain",
46+
"homepage": "http://www.gerkindevelopment.net/",
47+
"email": "agermain@gerkindevelopment.net",
48+
"role": "Developer"
4949
},
5050
"license": "GPLv3",
5151
"bugs": {
52-
"url": "https://github.com/iThoughts-Informatique/iThoughts-Tooltip-Glossary/issues"
52+
"url": "https://github.com/iThoughts-Informatique/iThoughts-Tooltip-Glossary/issues"
5353
},
5454
"homepage": "https://github.com/iThoughts-Informatique/iThoughts-Tooltip-Glossary#readme",
5555
"devDependencies": {
56-
"babel-preset-es2015": "^6.24.1",
57-
"chalk": "^1.1.3",
58-
"eslint": "^3.19.0",
59-
"eslint-config-standard": "^10.2.1",
60-
"eslint-plugin-promise": "^3.5.0",
61-
"eslint-plugin-standard": "^3.0.1",
62-
"eslint-tap": "^2.0.0",
63-
"grunt": "^1.0.1",
64-
"grunt-babel": "^6.0.0",
65-
"grunt-changed": "^1.1.1",
66-
"grunt-contrib-eslint": "0.0.5",
67-
"grunt-contrib-htmlmin": "^2.3.0",
68-
"grunt-contrib-jshint": "^1.1.0",
69-
"grunt-contrib-less": "^1.4.1",
70-
"grunt-contrib-uglify": "^2.3.0",
71-
"grunt-docco": "^0.5.0",
72-
"grunt-eslint": "^19.0.0",
73-
"grunt-jsdoc": "^2.1.0",
74-
"grunt-jslint": "^1.1.14",
75-
"grunt-lesslint": "^4.0.0",
76-
"grunt-phpcs": "^0.4.0",
77-
"grunt-phpdoc": "^1.0.0",
78-
"grunt-phplint": "^0.1.0",
79-
"grunt-postcss": "^0.8.0",
80-
"grunt-prompt": "^1.3.3",
81-
"grunt-rsync": "^2.0.1",
82-
"grunt-text-replace": "^0.4.0",
83-
"grunt-wp-readme-to-markdown": "^2.0.1",
84-
"less-plugin-autoprefix": "^1.5.1",
85-
"less-plugin-clean-css": "^1.5.1",
86-
"load-grunt-tasks": "^3.5.2",
87-
"lodash": "^4.17.4",
88-
"semver": "^5.3.0"
56+
"babel-preset-es2015": "^6.24.1",
57+
"chalk": "^1.1.3",
58+
"eslint": "^3.19.0",
59+
"eslint-config-standard": "^10.2.1",
60+
"eslint-plugin-promise": "^3.5.0",
61+
"eslint-plugin-standard": "^3.0.1",
62+
"eslint-tap": "^2.0.0",
63+
"grunt": "^1.0.1",
64+
"grunt-babel": "^6.0.0",
65+
"grunt-changed": "^1.1.1",
66+
"grunt-contrib-eslint": "0.0.5",
67+
"grunt-contrib-htmlmin": "^2.3.0",
68+
"grunt-contrib-jshint": "^1.1.0",
69+
"grunt-contrib-less": "^1.4.1",
70+
"grunt-contrib-uglify": "^2.3.0",
71+
"grunt-docco": "^0.5.0",
72+
"grunt-eslint": "^19.0.0",
73+
"grunt-jsdoc": "^2.1.0",
74+
"grunt-jslint": "^1.1.14",
75+
"grunt-lesslint": "^4.0.0",
76+
"grunt-phpcs": "^0.4.0",
77+
"grunt-phpdoc": "^1.0.0",
78+
"grunt-phplint": "^0.1.0",
79+
"grunt-postcss": "^0.8.0",
80+
"grunt-prompt": "^1.3.3",
81+
"grunt-rsync": "^2.0.1",
82+
"grunt-text-replace": "^0.4.0",
83+
"grunt-wp-readme-to-markdown": "^2.0.1",
84+
"less-plugin-autoprefix": "^1.5.1",
85+
"less-plugin-clean-css": "^1.5.1",
86+
"load-grunt-tasks": "^3.5.2",
87+
"lodash": "^4.17.4",
88+
"semver": "^5.3.0"
8989
}
90-
}
90+
}

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Plugin URI: https://www.gerkindevelopment.net/en/portfolio/ithoughts-tooltip-glo
66
Tags: tooltip, dictionary, glossary, appendix, technical terms, popup, tooltips, infobulle, definition, definitions, définition, définitions, dictionnaire, dictionnaires, dictionnaries, precision, information, informations, widget, widgets, shortocde, shortcodes, images, image, comment, comments, index, dictionnary, ajax, custom post type, post type, documentation, database, help, jquery, quote
77
Requires at least: 3.3
88
Tested up to: 4.8
9-
Stable tag: 3.0.0
9+
Stable tag: 3.0.1
1010
License: GPLv3
1111

1212
Create beautiful tooltips for descriptions or glossary terms, easily
@@ -78,6 +78,10 @@ For bug repports or unexpected behaviors, please see the dedicated [WordPress su
7878

7979
== Changelog ==
8080

81+
= 3.0.1 =
82+
* FIX Fatal error in Resource management (see [the forum thread](https://wordpress.org/support/topic/php-fatal-error-115/))
83+
* FIX Theme Editor
84+
8185
= 3.0.0 =
8286
* NEW Exclude glossary terms from search
8387
* NEW Automated tests, linting, docs, etc etc

0 commit comments

Comments
 (0)