W3cubDocs

/WordPress

WP_Customize_Setting::multidimensional_get( array $root, array $keys, mixed $default = null )

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

Parameters

$root

(array) (Required)

$keys

(array) (Required)

$default

(mixed) (Optional) A default value which is used as a fallback.

Default value: null

Return

(mixed) The requested value or the default value.

Source

File: wp-includes/class-wp-customize-setting.php

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

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

Changelog

Version Description
3.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_setting/multidimensional_get