diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-05-20 23:51:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 23:51:12 +0300 |
commit | 8951c52227150d2e74727bd245988c6f89190441 (patch) | |
tree | 669e22fecc2adb92fe43a1059a6d07016fc6958f | |
parent | 97a8d900f67217dfcbad63fa77d8475a90486946 (diff) |
Fix theme rewrite removes src attribute when custom plugin directory is used (#15965)
Noticed this in Matomo for WordPress which makes use of the ability to define custom plugin directories.
-rw-r--r-- | core/Theme.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Theme.php b/core/Theme.php index b46410a7f3..3a1f0bab2a 100644 --- a/core/Theme.php +++ b/core/Theme.php @@ -146,7 +146,7 @@ class Theme foreach (Manager::getAlternativeWebRootDirectories() as $absDir => $webRootDirectory) { $withoutPlugins = str_replace('plugins/', '', $pathAsset); if (file_exists($absDir . '/' . $withoutPlugins)) { - return $webRootDirectory . $withoutPlugins; + return str_replace($pathAsset, $webRootDirectory . $withoutPlugins, $source); } } |