Details
-
Type: New Feature
-
Status: Open
-
Priority: Trivial
-
Resolution: Unresolved
-
Affects Version/s: 4.7.27
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Needs Funding
-
Verified?:No
Description
Since this commit...
https://github.com/civicrm/civicrm-core/commit/f553d1eac3d3bd329fd85d0a2abf7b3acf2a7023
... we have some Wordpress-specific paths being setup on all installations.
Is there a better way of registering these paths only when it's a Wordpress installation?
I would like to add a similar path variable to get to the Drupal 'site' folder for the installation. (If people think that would be a useful addition to core).
A proof of concept is something like:
->register('d7.sitefolder', function () { global $civicrm_root; $config = \CRM_Core_Config::singleton(); $siteName = $config->userSystem->parseDrupalSiteNameFromRoot($civicrm_root); if (empty($siteName)) { $siteName = 'default'; } $route = '[cms.root]/sites/' . $siteName . '/'; return array( 'path' => \Civi::paths()->getPath($route), 'url' => \Civi::paths()->getUrl($route), ); })
However, it would be better not to define this on all sites.
(If this would be better in an extension/customisation then it would be great to know how we can add to the default paths?)
Tim Otten, Kevin Cristiano can you offer any advice?