function role_drush_help_alter

8.0.x role.drush.inc role_drush_help_alter(&$command)
7.x role.drush.inc role_drush_help_alter(&$command)
master role.drush.inc role_drush_help_alter(&$command)

Implements hook_drush_help_alter().

File

commands/core/role.drush.inc, line 21

Code

function role_drush_help_alter(&$command) {
  // Drupal 8+ has changed role names.
  if (in_array($command['command'], array('role-add-perm', 'role-add-perm', 'role-list')) && drush_drupal_major_version() >= 8) {
    foreach ($command['examples'] as $key => $val) {
      $newkey = str_replace(array('anonymous user', 'authenticated user'), array('anonymous', 'authenticated'), $key);
      $command['examples'][$newkey] = $val;
      unset($command['examples'][$key]);
    }
  }
}