WPDev.one
Core Function
View Source on Trac ↗

_wp_array_set()

_wp_array_set( mixed $input_array, mixed $path, mixed $value = null )

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

Parameters 2 required

Name / Type Description
$input_array
array

An array that we want to mutate to include a specific value in a path.

Required
$path
array

An array of keys describing the path that we want to mutate.

Required
$value
mixed

The value that will be set.

Return Value

(void)
No return value description available.

Function Information

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