From 03a3a8dcdfb48b57a9a19f53c7cd5384c973cfcb Mon Sep 17 00:00:00 2001 From: Kevin Pliester <5339107+pixelbart@users.noreply.github.com> Date: Fri, 12 Nov 2021 12:58:32 +0100 Subject: [PATCH] Update Stylesheet.class.php Since there are issues at this point, I would suggest a simple filter here to allow users to set their own source path, at least until the bug is fixed. https://wordpress.org/support/topic/version-1-9-compile-error/#post-14931305 --- lib/Stylesheet.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Stylesheet.class.php b/lib/Stylesheet.class.php index 5164632..64584e3 100644 --- a/lib/Stylesheet.class.php +++ b/lib/Stylesheet.class.php @@ -87,6 +87,7 @@ protected function configurePath() $wp_content_dir = str_replace(ABSPATH, '', WP_CONTENT_DIR); // get the 'wp-content' part of the path $lessfile_in_theme = preg_replace ('#^.*?' . DIRECTORY_SEPARATOR . $wp_content_dir . DIRECTORY_SEPARATOR . '(.*)$#', '$1', $this->stylesheet->src, 1); // the part after 'wp-content' $this->source_path = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . $lessfile_in_theme; + $this->source_path = apply_filters('wp-less/source_path', $this->souce_path); $this->source_uri = $this->stylesheet->src; $this->target_path = self::$upload_dir.$target_file; $this->target_uri = self::$upload_uri.$target_file;