civicrm-version.php - Fix CMS detection in pre-booted WordPress
authorTim Otten <totten@civicrm.org>
Fri, 11 May 2018 02:12:30 +0000 (19:12 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 11 May 2018 03:03:17 +0000 (20:03 -0700)
Ex 1: Running `wp-cli` commands
Ex 2: Running `cv` with `--level=cms-only`

civicrm-version.php

index 764bf552979b872352ae6c5e96c0959d767520d2..dca00fe227d4c67c8906314ddbd393312c4b706a 100755 (executable)
@@ -35,6 +35,9 @@ namespace _CiviVersion_ {
       elseif (function_exists('drupal_bootstrap') && version_compare(VERSION, '7.0', '>=') && version_compare(VERSION, '8.0', '<')) {
         return 'Drupal';
       }
+      elseif (defined('ABSPATH') && function_exists('get_bloginfo')) {
+        return 'WordPress';
+      }
       else {
         // guess CMS name from the current path
         list($cmsType,) = self::findCMSRootPath();