You are here

function _views_str_replace_recursive in Views (for Drupal 7) 7.3

Callback for performing a string replacement via array_walk_recursive().

Parameters

string $item: A leaf from the original array.

int $key: The key for the current array item.

array $args: Element 0 is the items to search for, element 1 is the replacements.

See also

_views_query_tag_alter_condition()

1 string reference to '_views_str_replace_recursive'
_views_query_tag_alter_condition in ./views.module
Replaces the substitutions recursive foreach condition.

File

./views.module, line 2464
Primarily Drupal hooks and global API functions to manipulate views.

Code

function _views_str_replace_recursive(&$item, $key, $args) {
  list($search, $replace) = $args;
  $item = str_replace($search, $replace, $item);
}