packages/kirki-framework/core/src/Helper.php
public static function recurse( $array, $array1 ) {
		foreach ( $array1 as $key => $value ) {

			// Create new key in $array, if it is empty or not an array.
			if ( ! isset( $array[ $key ] ) || ( isset( $array[ $key ] ) && ! is_array( $array[ $key ] ) ) ) {
				$array[ $key ] = [];
			}

			// Overwrite the value in the base array.
			if ( is_array( $value ) ) {
				$value = self::recurse( $array[ $key ], $value );
			}
			$array[ $key ] = $value;
		}
		return $array;
	}
public static function recurse( $array, $array1 ) {
		foreach ( $array1 as $key => $value ) {

			// Create new key in $array, if it is empty or not an array.
			if ( ! isset( $array[ $key ] ) || ( isset( $array[ $key ] ) && ! is_array( $array[ $key ] ) ) ) {
				$array[ $key ] = [];
			}

			// Overwrite the value in the base array.
			if ( is_array( $value ) ) {
				$value = self::recurse( $array[ $key ], $value );
			}
			$array[ $key ] = $value;
		}
		return $array;
	}
public static function recurse ( $ array , $ array1 ) { foreach ( $ array1 as $ key => $ value ) { // Create new key in $array, if it is empty or not an array. if ( ! isset ( $ array [ $ key ] ) || ( isset ( $ array [ $ key ] ) && ! is_array ( $ array [ $ key ] ) ) ) { $ array [ $ key ] = [ ] ; } // Overwrite the value in the base array. if ( is_array ( $ value ) ) { $ value = self :: recurse ( $ array [ $ key ] , $ value ) ; } $ array [ $ key ] = $ value ; } return $ array ; }
Helper method to be used from the array_replace_recursive method.

@static
@access public
@param array $array The first array.
@param array $array1 The second array.
@return array
Helper method to be used from the array_replace_recursive method .