WP-SCSS - Version 2.1.6

Version Description

  • When enqueueing CSS files Defer to WordPress for URLs instead of trying to guess them. Change by mmcev106
    • Allow setting Base Directory to Parent theme folder. Shadoath
Download this release

Release Info

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

Code changes from version 2.1.3 to 2.1.6

Files changed (5) hide show
  1. class/class-wp-scss.php +16 -6
  2. options.php +5 -2
  3. readme.md +87 -63
  4. readme.txt +61 -43
  5. wp-scss.php +2 -2
class/class-wp-scss.php CHANGED
@@ -74,7 +74,7 @@ class Wp_Scss {
74
  'sourceMapWriteTo' => $instance->css_dir . $map, // absolute path to a file to write the map to
75
  'sourceMapURL' => $map, // url of the map
76
  'sourceMapBasepath' => rtrim(ABSPATH, '/'), // base path for filename normalization
77
- 'sourceRoot' => '/', // This value is prepended to the individual entries in the 'source' field.
78
  ));
79
 
80
  $css = $scssc->compile(file_get_contents($in), $in);
@@ -166,7 +166,7 @@ class Wp_Scss {
166
  $latest_scss = 0;
167
  $latest_css = 0;
168
 
169
- foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->scss_dir), FilesystemIterator::SKIP_DOTS) as $sfile ) {
170
  if (pathinfo($sfile->getFilename(), PATHINFO_EXTENSION) == 'scss') {
171
  $file_time = $sfile->getMTime();
172
 
@@ -176,7 +176,7 @@ class Wp_Scss {
176
  }
177
  }
178
 
179
- foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->css_dir), FilesystemIterator::SKIP_DOTS) as $cfile ) {
180
  if (pathinfo($cfile->getFilename(), PATHINFO_EXTENSION) == 'css') {
181
  $file_time = $cfile->getMTime();
182
 
@@ -211,15 +211,25 @@ class Wp_Scss {
211
  * so it can be used in a url, not path
212
  */
213
  public function enqueue_files($base_folder_path, $css_folder) {
 
 
 
 
 
 
 
 
 
 
 
 
214
 
215
- $relative_path = explode(get_home_path(), $base_folder_path)[1];
216
  foreach( new DirectoryIterator($this->css_dir) as $stylesheet ) {
217
  if ( pathinfo($stylesheet->getFilename(), PATHINFO_EXTENSION) == 'css' ) {
218
  $name = $stylesheet->getBasename('.css') . '-style';
219
- $uri = '/'.$relative_path.$css_folder.$stylesheet->getFilename();
220
  $ver = $stylesheet->getMTime();
221
 
222
-
223
  wp_register_style(
224
  $name,
225
  $uri,
74
  'sourceMapWriteTo' => $instance->css_dir . $map, // absolute path to a file to write the map to
75
  'sourceMapURL' => $map, // url of the map
76
  'sourceMapBasepath' => rtrim(ABSPATH, '/'), // base path for filename normalization
77
+ 'sourceRoot' => home_url('/'), // This value is prepended to the individual entries in the 'source' field.
78
  ));
79
 
80
  $css = $scssc->compile(file_get_contents($in), $in);
166
  $latest_scss = 0;
167
  $latest_css = 0;
168
 
169
+ foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->scss_dir), RecursiveDirectoryIterator::SKIP_DOTS) as $sfile ) {
170
  if (pathinfo($sfile->getFilename(), PATHINFO_EXTENSION) == 'scss') {
171
  $file_time = $sfile->getMTime();
172
 
176
  }
177
  }
178
 
179
+ foreach ( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->css_dir), RecursiveDirectoryIterator::SKIP_DOTS) as $cfile ) {
180
  if (pathinfo($cfile->getFilename(), PATHINFO_EXTENSION) == 'css') {
181
  $file_time = $cfile->getMTime();
182
 
211
  * so it can be used in a url, not path
212
  */
213
  public function enqueue_files($base_folder_path, $css_folder) {
214
+ if($base_folder_path === wp_get_upload_dir()['basedir']){
215
+ $enqueue_base_url = wp_get_upload_dir()['baseurl'];
216
+ }
217
+ else if($base_folder_path === WPSCSS_PLUGIN_DIR){
218
+ $enqueue_base_url = plugins_url();
219
+ }
220
+ else if($base_folder_path === get_template_directory()){
221
+ $enqueue_base_url = get_template_directory_uri();
222
+ }
223
+ else{ // assume default of get_stylesheet_directory()
224
+ $enqueue_base_url = get_stylesheet_directory_uri();
225
+ }
226
 
 
227
  foreach( new DirectoryIterator($this->css_dir) as $stylesheet ) {
228
  if ( pathinfo($stylesheet->getFilename(), PATHINFO_EXTENSION) == 'css' ) {
229
  $name = $stylesheet->getBasename('.css') . '-style';
230
+ $uri = $enqueue_base_url . $css_folder . $stylesheet->getFilename();
231
  $ver = $stylesheet->getMTime();
232
 
 
233
  wp_register_style(
234
  $name,
235
  $uri,
options.php CHANGED
@@ -88,7 +88,8 @@ class Wp_Scss_Settings
88
  'name' => 'base_compiling_folder',
89
  'type' => apply_filters( 'wp_scss_base_compiling_modes',
90
  array(
91
- get_stylesheet_directory() => 'Current theme',
 
92
  wp_get_upload_dir()['basedir'] => 'Uploads directory',
93
  WPSCSS_PLUGIN_DIR => 'WP-SCSS Plugin',
94
  )
@@ -246,7 +247,9 @@ class Wp_Scss_Settings
246
  * Print the Section text
247
  */
248
  public function print_paths_info() {
249
- print 'Location of your SCSS/CSS folders. Folders must be nested under your <b>Base Location</b> and start with <code>/</code>.</br>Examples: <code>/custom-scss/</code> and <code>/custom-css/</code>';
 
 
250
  }
251
  public function print_compile_info() {
252
  print 'Choose how you would like SCSS and source maps to be compiled and how you would like the plugin to handle errors';
88
  'name' => 'base_compiling_folder',
89
  'type' => apply_filters( 'wp_scss_base_compiling_modes',
90
  array(
91
+ get_template_directory() => 'Parent theme', // Won't display if no parent theme as it would have duplicate keys in array
92
+ get_stylesheet_directory() => (get_stylesheet_directory() === get_template_directory() ? 'Current theme' : 'Child theme'),
93
  wp_get_upload_dir()['basedir'] => 'Uploads directory',
94
  WPSCSS_PLUGIN_DIR => 'WP-SCSS Plugin',
95
  )
247
  * Print the Section text
248
  */
249
  public function print_paths_info() {
250
+ print 'Location of your SCSS/CSS folders. Folders must be nested under your <b>Base Location</b> and start with <code>/</code>.' .
251
+ '</br>Examples: <code>/custom-scss/</code> and <code>/custom-css/</code>' .
252
+ '</br><b>Caution</b> updating some themes or plugins will delete the custom WP-SCSS Base Location when nested.';
253
  }
254
  public function print_compile_info() {
255
  print 'Choose how you would like SCSS and source maps to be compiled and how you would like the plugin to handle errors';
readme.md CHANGED
@@ -1,4 +1,5 @@
1
  # WP-SCSS
 
2
  #### A lightweight SCSS compiler for Wordpress.
3
 
4
  Compiles .scss files on your wordpress install using [scssphp](https://github.com/scssphp/scssphp). Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing.
@@ -8,7 +9,8 @@ The plugin only compiles when changes have been made to the scss files. Compiles
8
  ## Settings
9
 
10
  #### Directories
11
- Directories are defined relative to your `base compile folder` which defaults to the theme folder. Alternatly you can choose the uploads directory or plugin directory. They must be separate from one another, so you cannot define the root folder to compile into itself.
 
12
 
13
  Ideally you should setup a scss folder and a css folder within your theme. This will ensure the most accurate compiling.
14
 
@@ -21,44 +23,51 @@ Ideally you should setup a scss folder and a css folder within your theme. This
21
  | --ie.scss
22
 
23
  #### Compiling Mode
 
24
  Compiling comes in five modes:
25
 
26
- * Expanded - Full open css. One line per property. Brackets close on their own line.
27
- * Nested - Lightly compressed css. Brackets close with css block. Indents to match scss nesting.
28
- * Compressed - More compressed css. Entire rule block on one line. No indentation.
29
- * Compact - Removes all line breaks, unnecessary whitespace, and single-line comments.
30
- * Crunched - Same as Compressed, but also removes multi-line comments.
31
 
32
  See examples of each in [scssphp's documentation](http://scssphp.github.io/scssphp)
33
 
34
  #### Source Map Mode
 
35
  Source maps come in three modes:
36
 
37
- * None - No source map will be generated.
38
- * Inline - A source map will be generated in the compiled CSS file.
39
- * File - A source map will be generated as a standalone file in the compiled CSS directory.
40
 
41
  #### Error Display
 
42
  'Show in Header' will post a message on the front end when errors have occured. This helps debug as you write your scss.
43
 
44
  If you're working on a live/production site, you can send errors to a log. This will create a log file in your scss directory and print errors there as they occur. Just keep an eye on it, because the css will not be updated until errors have been resolved.
45
 
46
  #### Enqueuing
 
47
  The plugin can automatically add your css files to the header for you. This option will [enqueue](http://codex.wordpress.org/Function_Reference/wp_enqueue_style) all files found in the css directory defined in the settings. Keep this in mind if you have other non-compiled css files in this folder. The plugin will add them to the header, just don't reenque them somewhere else.
48
 
49
  Also keep in mind, that if you disable this plugin it can no longer enqueue files for you.
50
 
51
  ## Directions
52
- *This plugin requires at least php 5.6 to work.*
 
53
 
54
  #### Importing Subfiles
55
- You can import other scss files into parent files and compile them into a single css file. To do this, use @import as normal in your scss file. All imported file names *must* start with an underscore. Otherwise they will be compiled into their own css file.
 
56
 
57
  When importing in your scss file, you can leave off the underscore.
58
 
59
  @import 'subfile';
60
 
61
  #### Setting Variables via PHP
 
62
  You can set SCSS variables in your theme or plugin by using the wp_scss_variables filter.
63
 
64
  function wp_scss_set_variables(){
@@ -71,6 +80,7 @@ You can set SCSS variables in your theme or plugin by using the wp_scss_variable
71
  add_filter('wp_scss_variables','wp_scss_set_variables');
72
 
73
  #### Always Recompile
 
74
  During development it's sometimes useful to force stylesheet compilation on every page load. Especially on hosts where filemtime() is not updating consistently.
75
 
76
  You can tell the plugin to always recompile in the plugin options page or by adding the following constant to your wp-config.php or functions.php file.
@@ -78,7 +88,8 @@ You can tell the plugin to always recompile in the plugin options page or by add
78
  define('WP_SCSS_ALWAYS_RECOMPILE', true);
79
 
80
  #### Compass Support
81
- Currently there isn't a way to fully support [compass](https://github.com/chriseppstein/compass) with a php compiler. If you want limited support, you can manually import the compass framework. You'll need both the _compass.scss and compass directory.
 
82
 
83
  compass / frameworks / compass / stylesheets /
84
  @import 'compass';
@@ -86,60 +97,73 @@ Currently there isn't a way to fully support [compass](https://github.com/chrise
86
  Alternatively, you can include [Bourbon](https://github.com/thoughtbot/bourbon) in a similar fashion.
87
 
88
  #### .sass Support
 
89
  This plugin will only work with .scss format.
90
 
 
 
91
  ## Changelog
92
- * 2.1.3
93
- * Must declare global to use it for $base_compiling_folder.
94
- * 2.1.2
95
- * Correction for enqueueing styles not defaulting to get_stylesheet_directory() [Issue](https://github.com/ConnectThink/WP-SCSS/issues/168)
96
- * 2.1.1
97
- * Bug fixes after merging 2.0.2 and 2.1.0 defaults worked, but new options did not. [Shadoath](https://github.com/ConnectThink/WP-SCSS/issues/165)
98
- * 2.1.0
99
- * Settings dropdown added for choosing additional base compile locations outside of current theme. Suggestion by [pixeldesignstudio ](https://github.com/ConnectThink/WP-SCSS/issues/127)
100
- * 2.0.2
101
- * Added option in settings to enable an 'always recompile' flag. Suggestion by [bick](https://github.com/ConnectThink/WP-SCSS/issues/151)
102
- * 2.0.1
103
- * Bugfix to add filter for option_wpscss_options to remove Leafo if stored in DB. Thanks to [kinsky-org](https://github.com/ConnectThink/WP-SCSS/issues/157) for pointing this out
104
- * Saving plugin settings will update DB with correct value.
105
- * 2.0.0
106
- * Requires PHP 5.6
107
- * Update src to use [ScssPHP github repo at 1.0.2](https://github.com/scssphp/scssphp/tree/1.0.2)
108
- * Added check to make sure 'compiler' function was not already defined. [Shadoath](https://github.com/ConnectThink/WP-SCSS/pull/155)
109
- * 1.2.6
110
- * Create cache dir if it doesn't exist [@XNBlank](https://github.com/ConnectThink/WP-SCSS/pull/135)
111
- * Add cache dir as default [@mhbapcc](https://github.com/ConnectThink/WP-SCSS/pull/144)
112
- * 1.2.5
113
- * Fix error when ".*" folders exist [@chameron](https://github.com/ConnectThink/WP-SCSS/pull/111)
114
- * Add detailed error description for the directory settings [@andreyc0d3r](https://github.com/ConnectThink/WP-SCSS/pull/121)
115
- * Fix on SASS compilation trigger [@fazzinipierluigi](https://github.com/ConnectThink/WP-SCSS/pull/122)
116
- * 1.2.4
117
- * Updated scssphp to version 0.7.5
118
- * Added source map [@iannacone](https://github.com/ConnectThink/WP-SCSS/issues/49)
119
- * Always define $wpscss_compiler in the global scope [@jazbek](https://github.com/ConnectThink/WP-SCSS/pull/98)
120
- * 1.2.3
121
- * Updated scssphp to version 0.7.2 [@hellerbenjamin](https://github.com/ConnectThink/WP-SCSS/pull/86)
122
- * Removed depricated screen_icon()
123
- * 1.2.2
124
- * Updated scssphp to version 0.6.6
125
- * 1.2.1
126
- * Changed set version option to update if already exists
127
- * 1.2.0
128
- * Fixed a bug where directory inputs were not getting sanitized [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/66)
129
- * Made the missing directory warning also display if a specified path is a file [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/65)
130
- * Added /vendor to .gitignore [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/64)
131
- * Dont enqueue already enqueued stylesheets [@bobbysmith007](https://github.com/ConnectThink/WP-SCSS/pull/61)
132
- * 1.1.9 - Added filter to set variables via PHP [@ohlle](https://github.com/ohlle) and option to minify CSS output [@mndewitt](https://github.com/mndewitt)
133
- * 1.1.8 - Various improvements from pull requests by [@jbrains](https://github.com/jbrains) and [@brainfork](https://github.com/brainfork)
134
- * 1.1.7 - Update scssphp to 0.0.12 - pull from #16 [@GabrielGil](https://github.com/GabrielGil)
135
- * 1.1.6 - Upgraded scss.inc.php to version 0.0.10 - pull from #12 [@kirkhoff](https://github.com/kirkhoff)
136
- * 1.1.5 - Added option to only show errors to logged in users - merge from #10 [@tolnem](https://github.com/tolnem)
137
- * 1.1.4 - Add support for subfolders in scss directory
138
- * 1.1.3 - Fix print bug (2) in header
139
- * 1.1.2 - Add support for moved wp-content directory
140
- * 1.1.1 - Catch permissions errors
141
- * 1.0.0 - Initial Release
 
 
 
 
 
 
 
 
142
 
143
  ## License
144
- This plugin is developed and maintained by Connect Think and contributers.
 
 
145
  [GPL V3](http://www.gnu.org/copyleft/gpl.html)
1
  # WP-SCSS
2
+
3
  #### A lightweight SCSS compiler for Wordpress.
4
 
5
  Compiles .scss files on your wordpress install using [scssphp](https://github.com/scssphp/scssphp). Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing.
9
  ## Settings
10
 
11
  #### Directories
12
+
13
+ Directories are defined relative to your `base compile folder` which defaults to the theme folder. Alternatly you can choose the uploads directory or plugin directory. They must be separate from one another, so you cannot define the root folder to compile into itself.
14
 
15
  Ideally you should setup a scss folder and a css folder within your theme. This will ensure the most accurate compiling.
16
 
23
  | --ie.scss
24
 
25
  #### Compiling Mode
26
+
27
  Compiling comes in five modes:
28
 
29
+ - Expanded - Full open css. One line per property. Brackets close on their own line.
30
+ - Nested - Lightly compressed css. Brackets close with css block. Indents to match scss nesting.
31
+ - Compressed - More compressed css. Entire rule block on one line. No indentation.
32
+ - Compact - Removes all line breaks, unnecessary whitespace, and single-line comments.
33
+ - Crunched - Same as Compressed, but also removes multi-line comments.
34
 
35
  See examples of each in [scssphp's documentation](http://scssphp.github.io/scssphp)
36
 
37
  #### Source Map Mode
38
+
39
  Source maps come in three modes:
40
 
41
+ - None - No source map will be generated.
42
+ - Inline - A source map will be generated in the compiled CSS file.
43
+ - File - A source map will be generated as a standalone file in the compiled CSS directory.
44
 
45
  #### Error Display
46
+
47
  'Show in Header' will post a message on the front end when errors have occured. This helps debug as you write your scss.
48
 
49
  If you're working on a live/production site, you can send errors to a log. This will create a log file in your scss directory and print errors there as they occur. Just keep an eye on it, because the css will not be updated until errors have been resolved.
50
 
51
  #### Enqueuing
52
+
53
  The plugin can automatically add your css files to the header for you. This option will [enqueue](http://codex.wordpress.org/Function_Reference/wp_enqueue_style) all files found in the css directory defined in the settings. Keep this in mind if you have other non-compiled css files in this folder. The plugin will add them to the header, just don't reenque them somewhere else.
54
 
55
  Also keep in mind, that if you disable this plugin it can no longer enqueue files for you.
56
 
57
  ## Directions
58
+
59
+ _This plugin requires at least php 5.6 to work._
60
 
61
  #### Importing Subfiles
62
+
63
+ You can import other scss files into parent files and compile them into a single css file. To do this, use @import as normal in your scss file. All imported file names _must_ start with an underscore. Otherwise they will be compiled into their own css file.
64
 
65
  When importing in your scss file, you can leave off the underscore.
66
 
67
  @import 'subfile';
68
 
69
  #### Setting Variables via PHP
70
+
71
  You can set SCSS variables in your theme or plugin by using the wp_scss_variables filter.
72
 
73
  function wp_scss_set_variables(){
80
  add_filter('wp_scss_variables','wp_scss_set_variables');
81
 
82
  #### Always Recompile
83
+
84
  During development it's sometimes useful to force stylesheet compilation on every page load. Especially on hosts where filemtime() is not updating consistently.
85
 
86
  You can tell the plugin to always recompile in the plugin options page or by adding the following constant to your wp-config.php or functions.php file.
88
  define('WP_SCSS_ALWAYS_RECOMPILE', true);
89
 
90
  #### Compass Support
91
+
92
+ Currently there isn't a way to fully support [compass](https://github.com/chriseppstein/compass) with a php compiler. If you want limited support, you can manually import the compass framework. You'll need both the \_compass.scss and compass directory.
93
 
94
  compass / frameworks / compass / stylesheets /
95
  @import 'compass';
97
  Alternatively, you can include [Bourbon](https://github.com/thoughtbot/bourbon) in a similar fashion.
98
 
99
  #### .sass Support
100
+
101
  This plugin will only work with .scss format.
102
 
103
+ #### Maintainers
104
+
105
  ## Changelog
106
+
107
+ - 2.1.6
108
+ - When enqueueing CSS files Defer to WordPress for URLs instead of trying to guess them. Change by [mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/185)
109
+ - Allow setting Base Directory to Parent theme folder. [Shadoath](https://github.com/ConnectThink/WP-SCSS/issues/178)
110
+ - 2.1.5
111
+ - Enqueue CSS files using `realpath` function. Addition by [mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/179)
112
+ - 2.1.4
113
+ - Set source URL to be home_url('/') not simply `/`. Issue found by [realjjaveweb](https://github.com/ConnectThink/WP-SCSS/issues/128)
114
+ - 2.1.3
115
+ - Must declare global to use it for $base_compiling_folder.
116
+ - 2.1.2
117
+ - Correction for enqueueing styles not defaulting to get_stylesheet_directory() [Issue](https://github.com/ConnectThink/WP-SCSS/issues/168)
118
+ - 2.1.1
119
+ - Bug fixes after merging 2.0.2 and 2.1.0 defaults worked, but new options did not. [Shadoath](https://github.com/ConnectThink/WP-SCSS/issues/165)
120
+ - 2.1.0
121
+ - Settings dropdown added for choosing additional base compile locations outside of current theme. Suggestion by [pixeldesignstudio ](https://github.com/ConnectThink/WP-SCSS/issues/127)
122
+ - 2.0.2
123
+ - Added option in settings to enable an 'always recompile' flag. Suggestion by [bick](https://github.com/ConnectThink/WP-SCSS/issues/151)
124
+ - 2.0.1
125
+ - Bugfix to add filter for option_wpscss_options to remove Leafo if stored in DB. Thanks to [kinsky-org](https://github.com/ConnectThink/WP-SCSS/issues/157) for pointing this out
126
+ - Saving plugin settings will update DB with correct value.
127
+ - 2.0.0
128
+ - Requires PHP 5.6
129
+ - Update src to use [ScssPHP github repo at 1.0.2](https://github.com/scssphp/scssphp/tree/1.0.2)
130
+ - Added check to make sure 'compiler' function was not already defined. [Shadoath](https://github.com/ConnectThink/WP-SCSS/pull/155)
131
+ - 1.2.6
132
+ - Create cache dir if it doesn't exist [@XNBlank](https://github.com/ConnectThink/WP-SCSS/pull/135)
133
+ - Add cache dir as default [@mhbapcc](https://github.com/ConnectThink/WP-SCSS/pull/144)
134
+ - 1.2.5
135
+ - Fix error when ".\*" folders exist [@chameron](https://github.com/ConnectThink/WP-SCSS/pull/111)
136
+ - Add detailed error description for the directory settings [@andreyc0d3r](https://github.com/ConnectThink/WP-SCSS/pull/121)
137
+ - Fix on SASS compilation trigger [@fazzinipierluigi](https://github.com/ConnectThink/WP-SCSS/pull/122)
138
+ - 1.2.4
139
+ - Updated scssphp to version 0.7.5
140
+ - Added source map [@iannacone](https://github.com/ConnectThink/WP-SCSS/issues/49)
141
+ - Always define $wpscss_compiler in the global scope [@jazbek](https://github.com/ConnectThink/WP-SCSS/pull/98)
142
+ - 1.2.3
143
+ - Updated scssphp to version 0.7.2 [@hellerbenjamin](https://github.com/ConnectThink/WP-SCSS/pull/86)
144
+ - Removed depricated screen_icon()
145
+ - 1.2.2
146
+ - Updated scssphp to version 0.6.6
147
+ - 1.2.1
148
+ - Changed set version option to update if already exists
149
+ - 1.2.0
150
+ - Fixed a bug where directory inputs were not getting sanitized [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/66)
151
+ - Made the missing directory warning also display if a specified path is a file [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/65)
152
+ - Added /vendor to .gitignore [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/64)
153
+ - Dont enqueue already enqueued stylesheets [@bobbysmith007](https://github.com/ConnectThink/WP-SCSS/pull/61)
154
+ - 1.1.9 - Added filter to set variables via PHP [@ohlle](https://github.com/ohlle) and option to minify CSS output [@mndewitt](https://github.com/mndewitt)
155
+ - 1.1.8 - Various improvements from pull requests by [@jbrains](https://github.com/jbrains) and [@brainfork](https://github.com/brainfork)
156
+ - 1.1.7 - Update scssphp to 0.0.12 - pull from #16 [@GabrielGil](https://github.com/GabrielGil)
157
+ - 1.1.6 - Upgraded scss.inc.php to version 0.0.10 - pull from #12 [@kirkhoff](https://github.com/kirkhoff)
158
+ - 1.1.5 - Added option to only show errors to logged in users - merge from #10 [@tolnem](https://github.com/tolnem)
159
+ - 1.1.4 - Add support for subfolders in scss directory
160
+ - 1.1.3 - Fix print bug (2) in header
161
+ - 1.1.2 - Add support for moved wp-content directory
162
+ - 1.1.1 - Catch permissions errors
163
+ - 1.0.0 - Initial Release
164
 
165
  ## License
166
+
167
+ This plugin was developed by Connect Think. Now maintained by [shadoath](https://github.com/shadoath/), and contributers.
168
+
169
  [GPL V3](http://www.gnu.org/copyleft/gpl.html)
readme.txt CHANGED
@@ -1,10 +1,11 @@
1
  === WP-SCSS ===
2
- Contributors: connectthink
3
- Tags: sass, scss, css
4
  Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
  Requires at least: 3.0.1
6
- tested up to: 5.6.1
7
- Stable tag: 2.1.3
 
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/copyleft/gpl.html
10
 
@@ -46,110 +47,127 @@ When importing in your scss file, you can leave off the underscore.
46
 
47
 
48
  = Does this plugin support Compass? =
 
49
  Currently there isn't a way to fully support [compass](https://github.com/chriseppstein/compass) with a php compiler. If you want limited support, you can manually import the compass framework. You'll need both the _compass.scss and compass directory.
50
 
51
 
52
  > `compass / frameworks / compass / stylesheets /
53
-
54
  > `@import 'compass';`
55
 
56
-
57
  Alternatively, you can include [Bourbon](https://github.com/thoughtbot/bourbon) in a similar fashion.
58
 
 
59
  = Can I use .sass syntax with this Plugin? =
 
60
  This plugin will only work with .scss format.
61
 
 
62
  = It's not updating my css, what's happening? =
 
63
  Do you have errors printing to the front end? If not, check your log file in your scss directory. The css will not be updated if there are errors in your sass file(s).
64
 
65
  Make sure your directories are properly defined in the settings. Paths are defined from the root of the theme.
66
 
 
67
  = I'm having other issues and need help =
 
68
  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.
69
 
 
70
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
71
  = 2.1.3 =
72
- * Must declare global to use it for $base_compiling_folder.
73
 
74
  = 2.1.2 =
75
- * Correction for enqueueing styles not defaulting to get_stylesheet_directory() [Issue](https://github.com/ConnectThink/WP-SCSS/issues/168)
76
 
77
  = 2.1.1 =
78
- * Bug fixes after merging 2.0.2 and 2.1.0 defaults worked, but new options did not. [Shadoath](https://github.com/ConnectThink/WP-SCSS/issues/165)
79
 
80
  = 2.1.0 =
81
- * Settings dropdown added for choosing additional base compile locations outside of current theme. Suggestion by [pixeldesignstudio ](https://github.com/ConnectThink/WP-SCSS/issues/127)
82
 
83
  = 2.0.2 =
84
- * Added option in settings to enable an 'always recompile' flag. Suggestion by [bick](https://github.com/ConnectThink/WP-SCSS/issues/151)
85
 
86
  = 2.0.1 =
87
- * Bugfix to add filter for option_wpscss_options to remove Leafo if stored in DB. Thanks to [kinky-org](https://github.com/ConnectThink/WP-SCSS/issues/157) for pointing this out
88
- * Saving plugin settings will update DB with the correct value.
89
 
90
  = 2.0.0 =
91
- * Requires PHP 5.6
92
- * Update src to use [ScssPHP github repo at 1.0.2](https://github.com/scssphp/scssphp/tree/1.0.2)
93
- * Added check to make sure 'compiler' function was not already defined. [Shadoath](https://github.com/ConnectThink/WP-SCSS/pull/155)
94
 
95
  = 1.2.6 =
96
- * Create cache dir if it doesn't exist [@XNBlank](https://github.com/ConnectThink/WP-SCSS/pull/135
97
- * Add cache dir as default [@mhbapcc](https://github.com/ConnectThink/WP-SCSS/pull/144)
98
 
99
  = 1.2.5 =
100
- * Fix error when ".*" folders exist [@chameron](https://github.com/ConnectThink/WP-SCSS/pull/111)
101
- * Add detailed error description for the directory settings [@andreyc0d3r](https://github.com/ConnectThink/WP-SCSS/pull/121)
102
- * Fix on SASS compilation trigger [@fazzinipierluigi](https://github.com/ConnectThink/WP-SCSS/pull/122)
103
 
104
  = 1.2.4 =
105
- * Updated scssphp to version 0.7.5
106
- * Added source map [@iannacone](https://github.com/ConnectThink/WP-SCSS/issues/49)
107
- * Always define $wpscss_compiler in the global scope [@jazbek](https://github.com/ConnectThink/WP-SCSS/pull/98)
108
 
109
  = 1.2.3 =
110
- * Updated scssphp to version 0.7.2 [@hellerbenjamin](https://github.com/ConnectThink/WP-SCSS/pull/86)
111
- * Removed depricated screen_icon()
112
 
113
  = 1.2.2 =
114
- * Updated scssphp to version 0.6.6
115
 
116
  = 1.2.1 =
117
- * Changed set version option to update if already exists
118
 
119
  = 1.2.0 =
120
- * Fixed a bug where directory inputs were not getting sanitized [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/66)
121
- * Made the missing directory warning also display if a specified path is a file [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/65)
122
- * Added /vendor to .gitignore [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/64)
123
- * Dont enqueue already enqueued stylesheets [@bobbysmith007](https://github.com/ConnectThink/WP-SCSS/pull/61)
124
 
125
  = 1.1.9 =
126
- * Added filter to set variables via PHP [@ohlle](https://github.com/ohlle)
127
- * Added option to minify CSS output [@mndewitt](https://github.com/mndewitt)
128
 
129
  = 1.1.8 =
130
  Various improvements from pull requests by [@jbrains](https://github.com/jbrains) and [@brainfork](https://github.com/brainfork)
131
 
132
  = 1.1.7 =
133
- * Update scssphp to 0.0.12 - pull from #16 [@GabrielGil](https://github.com/GabrielGil)
134
 
135
  = 1.1.6 =
136
- * Upgraded scss.inc.php to version 0.0.10; via pull request from [kirkhoff](https://github.com/kirkhoff)
137
 
138
  = 1.1.5 =
139
- * Added option to only show errors to logged in users; via pull request from [tolnem](https://github.com/tolnem)
140
 
141
  = 1.1.4 =
142
- * Add suport for subfolders in scss directory
143
 
144
  = 1.1.3 =
145
- * Hotfix for a accidental character
146
 
147
  = 1.1.2 =
148
- * Added support for moved wp-content directories
149
 
150
  = 1.1.1 =
151
- * Added error handling for file permissions issues
152
- * Changed error log to .log for auto updating errors
153
 
154
  = 1.0.0 =
155
- * Initial Build
1
  === WP-SCSS ===
2
+ Contributors: connectthink, sky-bolt
3
+ Tags: sass, scss, css, ScssPhp
4
  Plugin URI: https://github.com/ConnectThink/WP-SCSS
5
  Requires at least: 3.0.1
6
+ Tested up to: 5.7.1
7
+ Requires PHP: 5.6
8
+ Stable tag: 2.1.6
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/copyleft/gpl.html
11
 
47
 
48
 
49
  = Does this plugin support Compass? =
50
+
51
  Currently there isn't a way to fully support [compass](https://github.com/chriseppstein/compass) with a php compiler. If you want limited support, you can manually import the compass framework. You'll need both the _compass.scss and compass directory.
52
 
53
 
54
  > `compass / frameworks / compass / stylesheets /
 
55
  > `@import 'compass';`
56
 
 
57
  Alternatively, you can include [Bourbon](https://github.com/thoughtbot/bourbon) in a similar fashion.
58
 
59
+
60
  = Can I use .sass syntax with this Plugin? =
61
+
62
  This plugin will only work with .scss format.
63
 
64
+
65
  = It's not updating my css, what's happening? =
66
+
67
  Do you have errors printing to the front end? If not, check your log file in your scss directory. The css will not be updated if there are errors in your sass file(s).
68
 
69
  Make sure your directories are properly defined in the settings. Paths are defined from the root of the theme.
70
 
71
+
72
  = I'm having other issues and need help =
73
+
74
  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.
75
 
76
+
77
  == Changelog ==
78
+
79
+ = 2.1.6 =
80
+ - When enqueueing CSS files Defer to WordPress for URLs instead of trying to guess them. Change by [mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/185)
81
+ - Allow setting Base Directory to Parent theme folder. [Shadoath](https://github.com/ConnectThink/WP-SCSS/issues/178)
82
+
83
+ = 2.1.5 =
84
+ - Enqueue CSS files using `realpath` function. Addition by [mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/179)
85
+
86
+ = 2.1.4 =
87
+ - Set source URL to be home_url('/') not simply `/`. Issue found by [realjjaveweb](https://github.com/ConnectThink/WP-SCSS/issues/128)
88
+
89
  = 2.1.3 =
90
+ - Must declare global to use it for $base_compiling_folder.
91
 
92
  = 2.1.2 =
93
+ - Correction for enqueueing styles not defaulting to get_stylesheet_directory() [Issue](https://github.com/ConnectThink/WP-SCSS/issues/168)
94
 
95
  = 2.1.1 =
96
+ - Bug fixes after merging 2.0.2 and 2.1.0 defaults worked, but new options did not. [Shadoath](https://github.com/ConnectThink/WP-SCSS/issues/165)
97
 
98
  = 2.1.0 =
99
+ - Settings dropdown added for choosing additional base compile locations outside of current theme. Suggestion by [pixeldesignstudio ](https://github.com/ConnectThink/WP-SCSS/issues/127)
100
 
101
  = 2.0.2 =
102
+ - Added option in settings to enable an 'always recompile' flag. Suggestion by [bick](https://github.com/ConnectThink/WP-SCSS/issues/151)
103
 
104
  = 2.0.1 =
105
+ - Bugfix to add filter for option_wpscss_options to remove Leafo if stored in DB. Thanks to [kinky-org](https://github.com/ConnectThink/WP-SCSS/issues/157) for pointing this out
106
+ - Saving plugin settings will update DB with the correct value.
107
 
108
  = 2.0.0 =
109
+ - Requires PHP 5.6
110
+ - Update src to use [ScssPHP github repo at 1.0.2](https://github.com/scssphp/scssphp/tree/1.0.2)
111
+ - Added check to make sure 'compiler' function was not already defined. [Shadoath](https://github.com/ConnectThink/WP-SCSS/pull/155)
112
 
113
  = 1.2.6 =
114
+ - Create cache dir if it doesn't exist [@XNBlank](https://github.com/ConnectThink/WP-SCSS/pull/135
115
+ - Add cache dir as default [@mhbapcc](https://github.com/ConnectThink/WP-SCSS/pull/144)
116
 
117
  = 1.2.5 =
118
+ - Fix error when ".*" folders exist [@chameron](https://github.com/ConnectThink/WP-SCSS/pull/111)
119
+ - Add detailed error description for the directory settings [@andreyc0d3r](https://github.com/ConnectThink/WP-SCSS/pull/121)
120
+ - Fix on SASS compilation trigger [@fazzinipierluigi](https://github.com/ConnectThink/WP-SCSS/pull/122)
121
 
122
  = 1.2.4 =
123
+ - Updated scssphp to version 0.7.5
124
+ - Added source map [@iannacone](https://github.com/ConnectThink/WP-SCSS/issues/49)
125
+ - Always define $wpscss_compiler in the global scope [@jazbek](https://github.com/ConnectThink/WP-SCSS/pull/98)
126
 
127
  = 1.2.3 =
128
+ - Updated scssphp to version 0.7.2 [@hellerbenjamin](https://github.com/ConnectThink/WP-SCSS/pull/86)
129
+ - Removed depricated screen_icon()
130
 
131
  = 1.2.2 =
132
+ - Updated scssphp to version 0.6.6
133
 
134
  = 1.2.1 =
135
+ - Changed set version option to update if already exists
136
 
137
  = 1.2.0 =
138
+ - Fixed a bug where directory inputs were not getting sanitized [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/66)
139
+ - Made the missing directory warning also display if a specified path is a file [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/65)
140
+ - Added /vendor to .gitignore [@mmcev106](https://github.com/ConnectThink/WP-SCSS/pull/64)
141
+ - Dont enqueue already enqueued stylesheets [@bobbysmith007](https://github.com/ConnectThink/WP-SCSS/pull/61)
142
 
143
  = 1.1.9 =
144
+ - Added filter to set variables via PHP [@ohlle](https://github.com/ohlle)
145
+ - Added option to minify CSS output [@mndewitt](https://github.com/mndewitt)
146
 
147
  = 1.1.8 =
148
  Various improvements from pull requests by [@jbrains](https://github.com/jbrains) and [@brainfork](https://github.com/brainfork)
149
 
150
  = 1.1.7 =
151
+ - Update scssphp to 0.0.12 - pull from #16 [@GabrielGil](https://github.com/GabrielGil)
152
 
153
  = 1.1.6 =
154
+ - Upgraded scss.inc.php to version 0.0.10; via pull request from [kirkhoff](https://github.com/kirkhoff)
155
 
156
  = 1.1.5 =
157
+ - Added option to only show errors to logged in users; via pull request from [tolnem](https://github.com/tolnem)
158
 
159
  = 1.1.4 =
160
+ - Add suport for subfolders in scss directory
161
 
162
  = 1.1.3 =
163
+ - Hotfix for a accidental character
164
 
165
  = 1.1.2 =
166
+ - Added support for moved wp-content directories
167
 
168
  = 1.1.1 =
169
+ - Added error handling for file permissions issues
170
+ - Changed error log to .log for auto updating errors
171
 
172
  = 1.0.0 =
173
+ - Initial Build
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.1.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.1.3');
48
 
49
  // Add version to options table
50
  if ( get_option( WPSCSS_VERSION_KEY ) !== false ) {
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.1.6
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.1.6');
48
 
49
  // Add version to options table
50
  if ( get_option( WPSCSS_VERSION_KEY ) !== false ) {