WP_Customize_Setting::multidimensional_replace( $root,  $keys, mixed $value )

Will attempt to replace a specific value in a multidimensional array.


Description Description


Parameters Parameters

$root

(Required)

$keys

(Required)

$value

(mixed) (Required) The value to update.


Top ↑

Return Return

(mixed)


Top ↑

Source Source

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

	final protected function multidimensional_replace( $root, $keys, $value ) {
		if ( ! isset( $value ) ) {
			return $root;
		} elseif ( empty( $keys ) ) { // If there are no keys, we're replacing the root.
			return $value;
		}

		$result = $this->multidimensional( $root, $keys, true );

		if ( isset( $result ) ) {
			$result['node'][ $result['key'] ] = $value;
		}

		return $root;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.