WP_Customize_Setting::multidimensional_get()protectedWP 3.4.0

Will attempt to fetch a specific value from a multidimensional array.

{} It's a method of the class: WP_Customize_Setting{}

No Hooks.

Return

Mixed. The requested value or the default value.

Usage

// protected - for code of main (parent) or child class
$result = $this->multidimensional_get( $root, $keys, $default_value );
$root(array) (required)
-
$keys(array) (required)
-
$default_value(mixed)
A default value which is used as a fallback.
Default: null

Changelog

Since 3.4.0 Introduced.

Code of WP_Customize_Setting::multidimensional_get() WP 6.0.2

final protected function multidimensional_get( $root, $keys, $default_value = null ) {
	if ( empty( $keys ) ) { // If there are no keys, test the root.
		return isset( $root ) ? $root : $default_value;
	}

	$result = $this->multidimensional( $root, $keys );
	return isset( $result ) ? $result['node'][ $result['key'] ] : $default_value;
}