WPDev.one

map_deep()

map_deep( mixed $value, mixed $callback )

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

Parameters 2 required

Name / Type Description
$value
mixed

The array, object, or scalar.

Required
$callback
callable

The function to map onto $value.

Required

Return Value

(mixed)
The value with the callback applied to all non-arrays and non-objects inside it.

Function Information

Since Version
4.4.0
Source File
wp-includes/formatting.php
Advertisement