map_deep


map_deep ( $value, $callback )

Parameters:
  • (mixed) $value The array, object, or scalar.
  • (callable) $callback The function to map onto $value.
Returns:
  • (mixed) The value with the callback applied to all non-arrays and non-objects inside it.
Defined at:

Description

Maps a function to all non-iterable elements of an array or an object.

This is similar to array_walk_recursive() but acts upon objects too.

Related Functions

map_meta_cap, wp_die, wp_delete_post, has_excerpt, add_feed

Top Google Results

User discussions

wpseek mobile