Skip to content

Commit

Permalink
Merge pull request #167 from ConnectThink/set-sourceRoot-to-home_url
Browse files Browse the repository at this point in the history
Set soureRoot to home_url('/') when setSourceMapOptions is called
  • Loading branch information
shadoath authored Mar 4, 2021
2 parents 7fb804a + f7cb65e commit 9e2b22d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion class/class-wp-scss.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function compiler($in, $out, $instance) {
'sourceMapWriteTo' => $instance->css_dir . $map, // absolute path to a file to write the map to
'sourceMapURL' => $map, // url of the map
'sourceMapBasepath' => rtrim(ABSPATH, '/'), // base path for filename normalization
'sourceRoot' => '/', // This value is prepended to the individual entries in the 'source' field.
'sourceRoot' => home_url('/'), // This value is prepended to the individual entries in the 'source' field.
));

$css = $scssc->compile(file_get_contents($in), $in);
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Alternatively, you can include [Bourbon](https://github.com/thoughtbot/bourbon)
This plugin will only work with .scss format.

## Changelog
* 2.1.4
* Set source URL to be home_url('/') not simply `/`. Issue found by [realjjaveweb](https://github.com/ConnectThink/WP-SCSS/issues/128)
* 2.1.3
* Must declare global to use it for $base_compiling_folder.
* 2.1.2
Expand Down
4 changes: 2 additions & 2 deletions wp-scss.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WP-SCSS
* Plugin URI: https://github.com/ConnectThink/WP-SCSS
* Description: Compiles scss files live on WordPress.
* Version: 2.1.3
* Version: 2.1.4
* Author: Connect Think
* Author URI: http://connectthink.com
* License: GPLv3
Expand Down Expand Up @@ -44,7 +44,7 @@
define('WPSCSS_VERSION_KEY', 'wpscss_version');

if (!defined('WPSCSS_VERSION_NUM'))
define('WPSCSS_VERSION_NUM', '2.1.3');
define('WPSCSS_VERSION_NUM', '2.1.4');

// Add version to options table
if ( get_option( WPSCSS_VERSION_KEY ) !== false ) {
Expand Down

0 comments on commit 9e2b22d

Please sign in to comment.