Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Use home_url in root_relative_url
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs committed Mar 7, 2016
1 parent 560dafc commit 51af6bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Use `home_url` in `root_relative_url` ([#147](https://github.com/roots/soil/issues/147))
* Add relative URLs to responsive images output ([#146](https://github.com/roots/soil/issues/146))
* Disable relative URLs in feeds ([#145](https://github.com/roots/soil/issues/145))
* Switch from Google CDN to jQuery CDN ([#144](https://github.com/roots/soil/issues/144))
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function root_relative_url($input) {
if (!isset($url['host']) || !isset($url['path'])) {
return $input;
}
$site_url = parse_url(network_site_url()); // falls back to site_url
$site_url = parse_url(network_home_url()); // falls back to home_url

This comment has been minimized.

Copy link
@entr

entr Mar 16, 2016

Why are we using network url at all? In a subdomain MS install $site_url['host'] === $url['host'] will become 'host.com' === 'site1.host.com'. Sticking always to home_url() should be fine IMO.


if (!isset($url['scheme'])) {
$url['scheme'] = $site_url['scheme'];
Expand Down

0 comments on commit 51af6bf

Please sign in to comment.