function DrupalBoot7::get_version

8.0.x DrupalBoot7.php DrupalBoot7::get_version($drupal_root)
master DrupalBoot7.php DrupalBoot7::get_version($drupal_root)

Given a site root directory, determine the exact version of the software.

Parameters

string $root: The full path to the site installation, with no trailing slash.

Return value

string|NULL The version string for the current version of the software, e.g. 8.1.3

Overrides DrupalBoot::get_version

File

lib/Drush/Boot/DrupalBoot7.php, line 18

Namespace

Drush\Boot

Class

DrupalBoot7

Code

function get_version($drupal_root) {
  $path = $drupal_root . '/includes/bootstrap.inc';
  if (is_file($path)) {
    require_once $path;
    if (defined('VERSION')) {
      return VERSION;
    }
  }
}