function _fancybox_array_replace_recursive in fancyBox 7.2
1 call to _fancybox_array_replace_recursive()
- fancybox_admin_settings_form in ./
fancybox.admin.inc - Provides the fancyBox jQuery plugin, a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages, and an extensive settings page for configuring fancyBox settings and how fancyBox…
File
- ./
fancybox.module, line 653 - Provides the fancyBox jQuery plugin, a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages, and an extensive settings page for configuring fancyBox settings and how fancyBox…
Code
function _fancybox_array_replace_recursive($array, $array1) {
if (function_exists('array_replace_recursive')) {
return array_replace_recursive($array, $array1);
}
function recurse($array, $array1) {
foreach ($array1 as $key => $value) {
if (!isset($array[$key]) || isset($array[$key]) && !is_array($array[$key])) {
$array[$key] = array();
}
if (is_array($value)) {
$value = recurse($array[$key], $value);
}
$array[$key] = $value;
}
return $array;
}
$args = func_get_args();
$array = $args[0];
if (!is_array($array)) {
return $array;
}
for ($i = 1; $i < count($args); $i++) {
if (is_array($args[$i])) {
$array = recurse($array, $args[$i]);
}
}
return $array;
}