Skip to content

Instantly share code, notes, and snippets.

@amitaibu
Created December 23, 2012 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitaibu/4363161 to your computer and use it in GitHub Desktop.
Save amitaibu/4363161 to your computer and use it in GitHub Desktop.
if ($field['cardinality'] > 1) {
foreach ($wrapper->{$field_name}->value() as $delta => $term) {
if ($term->vid != $this->vid) {
$wrapper->{$field_name}->offsetUnset($delta);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment