Skip to content

Commit

Permalink
AlterHTML was not only producing wrong URS in multisite (subdirs), bu…
Browse files Browse the repository at this point in the history
…t also multisite (subdomains). Fixed. Closes #510
  • Loading branch information
rosell-dk committed Nov 15, 2021
1 parent b5421c1 commit da860be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ If you want to make sure that my coffee supplies don't run dry, you can even buy
= Upcoming =
* Changed names for preventing replacing image with webp. Use "?dontreplace" / ".dontreplace" instead of "?original" and ".do-not-convert". The old ones are deprecated, but will still work (for a while)
* You can now convert images in the file manager and view conversion log
* Bugfix: In multisite (subdirs), Alter HTML produced wrong webp urls when destination structure was set to "image roots". Thanks to John A. Huebner II (@hube2) who lives on a big hill in central NY, USA for reporting the issue.
* Bugfix: In multisite, Alter HTML produced wrong webp urls when destination structure was set to "image roots". Thanks to John A. Huebner II (@hube2) who lives on a big hill in central NY, USA for reporting the issue.
* Added message to Elementor users on how to configure Elementor to inline CSS in order for Alter HTML to be able to replace image URLs (only displayed when relevant)
* Add UI for "skip-these-precompiled-binaries" cwebp option. Thanks to @madmax4ever for posting code for this.

Expand Down
4 changes: 2 additions & 2 deletions lib/classes/Paths.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ public static function destinationRoot($rootId, $destinationOptions)
];
} else {
$extraPath = '';
if (is_multisite() && !is_subdomain_install() && (get_current_blog_id() != 1)) {
$extraPath = '/sites/' . get_current_blog_id();
if (is_multisite() && (get_current_blog_id() != 1)) {
$extraPath = '/sites/' . get_current_blog_id(); // #510
}
return [
'url' => $destUrl . '/' . $rootId . $extraPath,
Expand Down

0 comments on commit da860be

Please sign in to comment.