WPDev.one
Core Function
View Source on Trac ↗

_wp_array_get()

_wp_array_get( mixed $input_array, mixed $path, mixed $default_value = null )

Accesses an array in depth based on a path of keys.

Parameters 3 required

Name / Type Description
$input_array
array

An array from which we want to retrieve some information.

Required
$path
array

An array of keys describing the path with which to retrieve information.

Required
mixed

$default_value Optional. The return value if the path does not exist within the array, or if `$input_array` or `$path` are not arrays. Default null.

Required

Return Value

(mixed)
The value from the path specified.

Function Information

Since Version
5.6.0
Source File
wp-includes/functions.php
Advertisement