You are here

private function lightgallery_style_plugin::flatten_array in Lightgallery 7

Flatten array and preserve keys.

Parameters

array $array:

Return value

array

1 call to lightgallery_style_plugin::flatten_array()
lightgallery_style_plugin::options_validate in views/lightgallery_style_plugin.inc
Add form validation for options.

File

views/lightgallery_style_plugin.inc, line 436
Contains the lightgallery style plugin.

Class

lightgallery_style_plugin
Style plugin to render views as lightgallery instance.

Code

private function flatten_array(array $array) {
  $flattened_array = array();
  array_walk_recursive($array, function ($a, $key) use (&$flattened_array) {
    $flattened_array[$key] = $a;
  });
  return $flattened_array;
}