WP-SCSS - Version 1.2.1

Version Description

  • Change set version option to update if already exists
Download this release

Release Info

Developer connectthink
Plugin Icon wp plugin WP-SCSS
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

Files changed (2) hide show
  1. readme.txt +4 -1
  2. wp-scss.php +16 -5
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: sass, scss, css
4
  Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
  Requires at least: 3.0.1
6
  Tested up to: 4.7
7
- Stable tag: 1.2.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/copyleft/gpl.html
10
 
@@ -62,6 +62,9 @@ Make sure your directories are properly defined in the settings. Paths are defin
62
  If you are having issues with the plugin, create an issue on [github](https://github.com/ConnectThink/WP-SCSS), and we'll do our best to help.
63
 
64
  == Changelog ==
 
 
 
65
  = 1.2.0 =
66
  * Fixed a bug where directory inputs were not getting sanitized [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/66)
67
  * Made the missing directory warning also display if a specified path is a file [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/65)
4
  Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
  Requires at least: 3.0.1
6
  Tested up to: 4.7
7
+ Stable tag: 1.2.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/copyleft/gpl.html
10
 
62
  If you are having issues with the plugin, create an issue on [github](https://github.com/ConnectThink/WP-SCSS), and we'll do our best to help.
63
 
64
  == Changelog ==
65
+ = 1.2.1 =
66
+ * Change set version option to update if already exists
67
+
68
  = 1.2.0 =
69
  * Fixed a bug where directory inputs were not getting sanitized [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/66)
70
  * Made the missing directory warning also display if a specified path is a file [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/65)
wp-scss.php CHANGED
@@ -2,8 +2,8 @@
2
  /**
3
  * Plugin Name: WP-SCSS
4
  * Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
- * Description: Compiles scss files live on wordpress.
6
- * Version: 1.2.0
7
  * Author: Connect Think
8
  * Author URI: http://connectthink.com
9
  * License: GPLv3
@@ -46,14 +46,25 @@ if (!defined('WPSCSS_VERSION_KEY'))
46
  define('WPSCSS_VERSION_KEY', 'wpscss_version');
47
 
48
  if (!defined('WPSCSS_VERSION_NUM'))
49
- define('WPSCSS_VERSION_NUM', '1.2.0');
50
 
51
  // Add version to options table
52
- add_option(WPSCSS_VERSION_KEY, WPSCSS_VERSION_NUM);
 
 
 
 
 
 
 
 
 
 
 
53
 
54
 
55
  /*
56
- * 2. REQUIRE DEPENDANCIES
57
  *
58
  * scssphp - scss compiler
59
  * class-wp-scss
2
  /**
3
  * Plugin Name: WP-SCSS
4
  * Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
+ * Description: Compiles scss files live on WordPress.
6
+ * Version: 1.2.1
7
  * Author: Connect Think
8
  * Author URI: http://connectthink.com
9
  * License: GPLv3
46
  define('WPSCSS_VERSION_KEY', 'wpscss_version');
47
 
48
  if (!defined('WPSCSS_VERSION_NUM'))
49
+ define('WPSCSS_VERSION_NUM', '1.2.1');
50
 
51
  // Add version to options table
52
+ if ( get_option( WPSCSS_VERSION_KEY ) !== false ) {
53
+
54
+ // The option already exists, so we just update it.
55
+ update_option( WPSCSS_VERSION_KEY, WPSCSS_VERSION_NUM );
56
+
57
+ } else {
58
+
59
+ // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
60
+ $deprecated = null;
61
+ $autoload = 'no';
62
+ add_option( WPSCSS_VERSION_KEY, WPSCSS_VERSION_NUM, $deprecated, $autoload );
63
+ }
64
 
65
 
66
  /*
67
+ * 2. REQUIRE DEPENDENCIES
68
  *
69
  * scssphp - scss compiler
70
  * class-wp-scss