function drush_core_status

8.0.x core.drush.inc drush_core_status()
6.x core.drush.inc drush_core_status()
7.x core.drush.inc drush_core_status()
3.x core.drush.inc drush_core_status()
4.x core.drush.inc drush_core_status()
5.x core.drush.inc drush_core_status()
master core.drush.inc drush_core_status()

Command callback. Provides a birds-eye view of the current Drupal installation.

File

commands/core/core.drush.inc, line 560
Core drush commands.

Code

function drush_core_status() {
  drush_bootstrap_max();
  $status_table = _core_site_status_table(drush_get_option('project', ''));
  // If args are specified, filter out any entry that is not named
  // (in other words, only show lines named by one of the arg values)
  $args = func_get_args();
  if (!empty($args)) {
    foreach ($status_table as $key => $value) {
      if (!_drush_core_is_named_in_array($key, $args)) {
        unset($status_table[$key]);
      }
    }
  }
  drush_backend_set_result($status_table);
  unset($status_table['%paths']);
  // Print either an ini-format list or a formatted ASCII table
  if (drush_get_option('pipe')) {
    if (count($status_table) == 1) {
      $first_value = array_shift($status_table);
      drush_print_pipe($first_value);
    }
    else {
      drush_print_pipe(_core_site_credential_list($status_table));
    }
  }
  else {
    unset($status_table['Modules path']);
    unset($status_table['Themes path']);
    drush_print_table(drush_key_value_to_array_table($status_table));
  }
  return;
}