Commit 0f394dd0 authored by totten's avatar totten

CRM-16421 - Installation - Update to newer protocol

To simplify the overall build/distribution process, this patch allows us to
include the `civicrm-setup` code with all builds. (Thus, it can be listed
as a dependency in `composer.json`.) The opt-in/opt-out mechanism is
a placeholder file in `${civicrm-core}/.use-civicrm-setup`.
parent 4fd42deb
......@@ -801,15 +801,14 @@ class CiviCRM_For_WordPress {
foreach ($setupPaths as $setupPath) {
$loader = implode(DIRECTORY_SEPARATOR, [$civicrmCore, $setupPath, 'civicrm-setup-autoload.php']);
if (file_exists($loader)) {
if (file_exists($civicrmCore . DIRECTORY_SEPARATOR . '.use-civicrm-setup') && file_exists($loader)) {
require_once $loader;
require_once implode(DIRECTORY_SEPARATOR, [$civicrmCore, 'CRM', 'Core', 'ClassLoader.php']);
'cms' => 'WordPress',
'srcPath' => $civicrmCore,
'setupPath' => dirname($loader),
$ctrl = \Civi\Setup::instance()->createController()->getCtrl();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment