From 1fd292a90ad3edbcb74e7f9d464920ebb90f22e0 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 10 May 2018 19:12:30 -0700 Subject: [PATCH] civicrm-version.php - Fix CMS detection in pre-booted WordPress Ex 1: Running `wp-cli` commands Ex 2: Running `cv` with `--level=cms-only` --- civicrm-version.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/civicrm-version.php b/civicrm-version.php index 764bf55297..dca00fe227 100755 --- a/civicrm-version.php +++ b/civicrm-version.php @@ -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(); -- 2.25.1