WP-SCSS - Version 2.3.5

Version Description

  • Add 'selected' to wp_kses on select() shadoath
Download this release

Release Info

Developer Sky Bolt
Plugin Icon wp plugin WP-SCSS
Version 2.3.5
Comparing to
See all releases

Code changes from version 2.3.3 to 2.3.5

Files changed (4) hide show
  1. options.php +8 -7
  2. readme.md +9 -1
  3. readme.txt +8 -1
  4. wp-scss.php +10 -8
options.php CHANGED
@@ -274,7 +274,7 @@ class Wp_Scss_Settings {
274
  }
275
  $html .= '</select>';
276
 
277
- echo wp_kses($html, array( 'select' => array('id' => array(), 'name' => array()), 'option' => array('value' => array())));
278
  }
279
 
280
  /**
@@ -283,14 +283,15 @@ class Wp_Scss_Settings {
283
  public function input_checkbox_callback( $args ) {
284
  $this->options = get_option( 'wpscss_options' );
285
  $html = "";
286
- if($args['name'] == 'always_recompile' && defined('WP_SCSS_ALWAYS_RECOMPILE') && WP_SCSS_ALWAYS_RECOMPILE){
287
- $html .= '<input type="checkbox" id="' . esc_attr( $args['name'] ) . '" name="wpscss_options[' . esc_attr( $args['name'] ) . ']" value="1"' . checked( 1, isset( $this->options[esc_attr( $args['name'] )] ) ? $this->options[esc_attr( $args['name'] )] : 1, false ) . ' disabled=disabled/>';
288
- $html .= '<label for="' . esc_attr( $args['name'] ) . '">Currently overwritten by constant <code>WP_SCSS_ALWAYS_RECOMPILE</code></label>';
 
289
  }else{
290
- $html .= '<input type="checkbox" id="' . esc_attr( $args['name'] ) . '" name="wpscss_options[' . esc_attr( $args['name'] ) . ']" value="1"' . checked( 1, isset( $this->options[esc_attr( $args['name'] )] ) ? $this->options[esc_attr( $args['name'] )] : 0, false ) . '/>';
291
- $html .= '<label for="' . esc_attr( $args['name'] ) . '"></label>';
292
  }
293
 
294
- echo wp_kses($html, array('input' => array('type' => array(), 'name' => array(), 'value' => array(), 'disabled' => array()), 'label' => array('for' => array()) ));
295
  }
296
  }
274
  }
275
  $html .= '</select>';
276
 
277
+ echo wp_kses($html, array( 'select' => array('id' => array(), 'name' => array()), 'option' => array('value' => array(), 'selected' => array())));
278
  }
279
 
280
  /**
283
  public function input_checkbox_callback( $args ) {
284
  $this->options = get_option( 'wpscss_options' );
285
  $html = "";
286
+ $option_name = esc_attr( $args['name']);
287
+ if($option_name == 'always_recompile' && defined('WP_SCSS_ALWAYS_RECOMPILE') && WP_SCSS_ALWAYS_RECOMPILE){
288
+ $html .= '<input type="checkbox" id="' . $option_name . '" name="wpscss_options[' . $option_name . ']" value="1"' . checked( 1, isset( $this->options[$option_name] ) ? $this->options[$option_name] : 1, false ) . ' disabled=disabled/>';
289
+ $html .= '<label for="' . $option_name . '">Currently overwritten by constant <code>WP_SCSS_ALWAYS_RECOMPILE</code></label>';
290
  }else{
291
+ $html .= '<input type="checkbox" id="' . $option_name . '" name="wpscss_options[' . $option_name . ']" value="1"' . checked( 1, isset( $this->options[$option_name] ) ? $this->options[$option_name] : 0, false ) . '/>';
292
+ $html .= '<label for="' . $option_name . '"></label>';
293
  }
294
 
295
+ echo wp_kses($html, array('input' => array('type' => array(), 'id' => array(), 'name' => array(), 'value' => array(), 'checked' => array(), 'disabled' => array()), 'label' => array('for' => array()) ));
296
  }
297
  }
readme.md CHANGED
@@ -29,7 +29,7 @@ Compiling comes in two modes:
29
  - Compressed - More compressed css. Entire rule block on one line. No indentation.
30
  - Expanded - Full open css. One line per property. Brackets close on their own line.
31
 
32
- **Removed** compiling modes
33
 
34
  - Nested - Lightly compressed css. Brackets close with css block. Indents to match scss nesting.
35
  - Compact - Removes all line breaks, unnecessary whitespace, and single-line comments.
@@ -105,8 +105,16 @@ This plugin will only work with .scss format.
105
 
106
  #### Maintainers
107
 
 
 
 
108
  ## Changelog
109
 
 
 
 
 
 
110
  - 2.3.3
111
  - Fix params passed to wp_kses() [shadoath](https://github.com/ConnectThink/WP-SCSS/pull/211)
112
  - 2.3.2
29
  - Compressed - More compressed css. Entire rule block on one line. No indentation.
30
  - Expanded - Full open css. One line per property. Brackets close on their own line.
31
 
32
+ **Removed** compiling modes. If you used these in the past you will need to update your settings.
33
 
34
  - Nested - Lightly compressed css. Brackets close with css block. Indents to match scss nesting.
35
  - Compact - Removes all line breaks, unnecessary whitespace, and single-line comments.
105
 
106
  #### Maintainers
107
 
108
+ - [@shadoath](https://github.com/shadoath)
109
+ - Bug reporters, issues, and pull request contributers metioned below. Thank you.
110
+
111
  ## Changelog
112
 
113
+ - 2.3.5
114
+ - Add 'selected' to wp_kses on select() [shadoath](https://github.com/ConnectThink/WP-SCSS/issues/217)
115
+ - 2.3.4
116
+ - Add check to compiling_options on load() [alianschiavoncini](https://github.com/ConnectThink/WP-SCSS/issues/209)
117
+ - Add more params to wp_kses in options() [evHaitch](https://github.com/ConnectThink/WP-SCSS/issues/213)
118
  - 2.3.3
119
  - Fix params passed to wp_kses() [shadoath](https://github.com/ConnectThink/WP-SCSS/pull/211)
120
  - 2.3.2
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
  Requires at least: 3.0.1
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
- Stable tag: 2.3.3
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/copyleft/gpl.html
11
 
@@ -76,6 +76,13 @@ If you are having issues with the plugin, create an issue on [github](https://gi
76
 
77
  == Changelog ==
78
 
 
 
 
 
 
 
 
79
  = 2.3.3 =
80
  - Fix params passed to wp_kses() [shadoath](https://github.com/ConnectThink/WP-SCSS/pull/211)
81
 
5
  Requires at least: 3.0.1
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 2.3.5
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/copyleft/gpl.html
11
 
76
 
77
  == Changelog ==
78
 
79
+ = 2.3.5 =
80
+ - Add 'selected' to wp_kses on select() [shadoath](https://github.com/ConnectThink/WP-SCSS/issues/217)
81
+
82
+ = 2.3.4 =
83
+ - Add check to compiling_options on load() [alianschiavoncini](https://github.com/ConnectThink/WP-SCSS/issues/209)
84
+ - Add more params to wp_kses in options() [evHaitch ](https://github.com/ConnectThink/WP-SCSS/issues/213)
85
+
86
  = 2.3.3 =
87
  - Fix params passed to wp_kses() [shadoath](https://github.com/ConnectThink/WP-SCSS/pull/211)
88
 
wp-scss.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP-SCSS
4
  * Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
  * Description: Compiles scss files live on WordPress.
6
- * Version: 2.3.3
7
  * Author: Connect Think
8
  * Author URI: http://connectthink.com
9
  * License: GPLv3
@@ -44,7 +44,7 @@ if (!defined('WPSCSS_VERSION_KEY'))
44
  define('WPSCSS_VERSION_KEY', 'wpscss_version');
45
 
46
  if (!defined('WPSCSS_VERSION_NUM'))
47
- define('WPSCSS_VERSION_NUM', '2.3.3');
48
 
49
  // Add version to options table
50
  if ( get_option( WPSCSS_VERSION_KEY ) !== false ) {
@@ -111,12 +111,14 @@ function wpscss_plugin_action_links($links, $file) {
111
 
112
  add_filter('option_wpscss_options', 'wpscss_plugin_db_cleanup');
113
  function wpscss_plugin_db_cleanup($option_values){
114
- $compiling_options = str_replace("Leafo", "ScssPhp", $option_values['compiling_options']);
115
- $compiling_options = str_replace("ScssPhp\\ScssPhp\\Formatter\\", "", $compiling_options);
116
- $compiling_options = str_replace(["Compact", "Crunched"], "compressed", $compiling_options);
117
- $compiling_options = str_replace("Nested", "expanded", $compiling_options);
118
- $compiling_options = strtolower($compiling_options);
119
- $option_values['compiling_options'] = $compiling_options;
 
 
120
  return $option_values;
121
  }
122
 
3
  * Plugin Name: WP-SCSS
4
  * Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
  * Description: Compiles scss files live on WordPress.
6
+ * Version: 2.3.5
7
  * Author: Connect Think
8
  * Author URI: http://connectthink.com
9
  * License: GPLv3
44
  define('WPSCSS_VERSION_KEY', 'wpscss_version');
45
 
46
  if (!defined('WPSCSS_VERSION_NUM'))
47
+ define('WPSCSS_VERSION_NUM', '2.3.5');
48
 
49
  // Add version to options table
50
  if ( get_option( WPSCSS_VERSION_KEY ) !== false ) {
111
 
112
  add_filter('option_wpscss_options', 'wpscss_plugin_db_cleanup');
113
  function wpscss_plugin_db_cleanup($option_values){
114
+ if( array_key_exists('compiling_options', $option_values) ) {
115
+ $compiling_options = str_replace("Leafo", "ScssPhp", $option_values['compiling_options']);
116
+ $compiling_options = str_replace("ScssPhp\\ScssPhp\\Formatter\\", "", $compiling_options);
117
+ $compiling_options = str_replace(["Compact", "Crunched"], "compressed", $compiling_options);
118
+ $compiling_options = str_replace("Nested", "expanded", $compiling_options);
119
+ $compiling_options = strtolower($compiling_options);
120
+ $option_values['compiling_options'] = $compiling_options;
121
+ }
122
  return $option_values;
123
  }
124