[Plugin: WP-LESS] Root-relative paths
-
I got irritated on an in all other respects superb plugin, because I needed to be able to set paths relative to root.
Example:
background: url(/path/to/image);So I dug into it and in the file Plugin.class.php I found the solution. In the function filterStylesheetUri I changed the lines:
$css = str_replace( array($token.'data:', $token), array('data:', dirname($stylesheet->getSourceUri()).'/'), $css);
to:
$css = str_replace( array($token.'/', $token.'data:', $token), array('/', 'data:', dirname($stylesheet->getSourceUri()).'/'), $css);
Adding the “/” as a valid variant, just as “data:”.
Hope this helps someone ??
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: WP-LESS] Root-relative paths’ is closed to new replies.