You are here

function finder_i18nstrings_delete_strings in Finder 7

Same name and namespace in other branches
  1. 6 modules/finder_i18nstrings/finder_i18nstrings.module \finder_i18nstrings_delete_strings()

Recursively delete strings using the map.

1 call to finder_i18nstrings_delete_strings()
finder_i18nstrings_finderapi in modules/finder_i18nstrings/finder_i18nstrings.module
Implements hook_finderapi().

File

modules/finder_i18nstrings/finder_i18nstrings.module, line 242
The finder string translation module.

Code

function finder_i18nstrings_delete_strings($object, $map) {
  $object = (array) $object;
  if (!empty($map)) {
    foreach ($map as $key => $value) {
      if (isset($object[$key]) && !empty($value['#i18nstrings'])) {
        i18n_string_remove($value['#i18nstrings'], $object[$key]);
      }
      if (is_array($map[$key])) {
        finder_i18nstrings_delete_strings($object[$key], $map[$key]);
      }
    }
  }
}