Fix: fix issue on zorgsites where (password reset) url is created with first network site url instead of the current site#2
Fix: fix issue on zorgsites where (password reset) url is created with first network site url instead of the current site#2ShunLuk wants to merge 2 commits into
Conversation
first network site url instead of the current site
There was a problem hiding this comment.
Pull request overview
Updates the multisite Bedrock URL-fixing plugin to generate network_site_url values using the current request host, addressing cases where password reset (and similar) URLs are built using the first network site’s domain instead of the active site’s domain.
Changes:
- Modify
fixNetworkSiteURL()to rebuild the base URL from the current request scheme/host rather than trimming the incoming$url. - Update the docblock to reflect the new “current request host” behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if (substr($url, -3) !== 'wp/') { |
| $scheme = is_ssl() ? 'https' : 'http'; | ||
| $host = $_SERVER['HTTP_HOST'] ?? parse_url($url, PHP_URL_HOST); | ||
| $url = $scheme . '://' . $host . '/'; | ||
|
|
|
Ligt wss aan dit: https://github.com/yardinternet/zorgsites/blob/main/web/app/themes/sage/app/Hooks/WordPress.php#L60, liefst op zorgsites repo niveau fixen wss |
|
Als je in ZorgSites de User hooks uit Brave Hooks include is dat automatisch gefixt (en ook specifiek voor alle wp-login.php) acties: https://github.com/yardinternet/brave-hooks/blob/main/src/User.php#L38 Nog beter is natuurlijk ZorgSites upgraden naar Brave Hooks 2, zodat nieuwe hook files uit Brave Hooks automatisch gebruikt worden. |
Ik denk dat yard/waiting-room-block wp-hook-registrar ^1.0 nodig heeft, waardoor dat in zorgsites vastzit. Zal ik de hook-registrar daar dan ook updaten? |
No description provided.