You are here

function drush_stringoverrides_remove in String Overrides 7

Drush Callback; Removes a String Override.

File

./stringoverrides.drush.inc, line 210
Drush interface for String Overrides.

Code

function drush_stringoverrides_remove($original) {

  // Get the available options.
  $language = drush_get_option('language', 'en');
  $context = drush_get_option('context', '');

  // Load the current overrides.
  $disabled = variable_get("locale_custom_disabled_strings_{$language}", array());
  $enabled = variable_get("locale_custom_strings_{$language}", array());

  // Remove the string override.
  unset($disabled[$context][$original]);
  unset($enabled[$context][$original]);
  variable_set("locale_custom_disabled_strings_{$language}", $disabled);
  variable_set("locale_custom_strings_{$language}", $enabled);
  drush_print(dt('String override removed.'));
}