You are here

function finder_i18nstrings_delete_strings in Finder 6

Same name and namespace in other branches
  1. 7 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
Implementation of hook_finderapi().

File

modules/finder_i18nstrings/finder_i18nstrings.module, line 249
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'])) {
        i18nstrings_remove($value['#i18nstrings'], $object[$key]);
      }
      if (is_array($map[$key])) {
        finder_i18nstrings_delete_strings($object[$key], $map[$key]);
      }
    }
  }
}