-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WP - Change definitions of cms.root
, civicrm.root
#17360
Conversation
(Standard links)
|
Ping @christianwach |
Thanks for this @totten - it looks like this is functionally identical to #17353 with the bonus that the legacy routes (which I ignored) are still accommodated 🥇 Do later declarations of |
Later declarations replace earlier ones ✅ civicrm-core/Civi/Core/Paths.php Lines 131 to 134 in 8d0e37b
There's a small element of luck in how this patch worked out -- given that civicrm-core/Civi/Core/Container.php Lines 501 to 505 in 8d0e37b
Firing a hook in |
@christianwach Have you specifically tested this PR and are you happy that it should be merged? |
I'd like to see this in 5.27 if I had my way, but lost track of it. I have done @totten any thoughts on having this in 5.27 as the RC just dropped? |
Jenkins re test this please |
Test fails unrelated |
Overview
This is an alternative to #17353.
Before
The logic for computing path/URL defaults is in
Civi/Core/Paths.php
.On WP, normal Civi pages and standalone extern scripts use the same logic for computing paths/URLs.
After
The base logic for computing path/URL defaults is in
Civi/Core/Paths.php
.For Civi-WP, certain variables (which are easier to compute via WP APIs) are overridden in
CRM/Utils/System/WordPress.php
.On WP, the path/URL logic for has been split:
Technical Details
Some key differentiators vs #17353:
Civi::paths()->register()
interfacegetFooStorage()
functionsextern/*
scripts, and if those scripts are currently working, then they should continue working in the same way as before.wp.frontend
,wp.backend
, etc variables (which are really WP-specific) out fromCivi/Core/Paths.php
toCRM/Utils/System/WordPress.php
.