You are here

function responsive_menus_glob_recursive in Responsive Menus 7

Recursively glob for directories.

Parameters

string $directory: Directory to glob.

array $directories: Increasing array of matching directories.

1 call to responsive_menus_glob_recursive()
responsive_menus_glob_files in ./responsive_menus.module
Recursively search through directories for files with given extension.

File

./responsive_menus.module, line 1167
Responsify menus in Drupal.

Code

function responsive_menus_glob_recursive($directory, &$directories = array()) {
  foreach (glob($directory, GLOB_ONLYDIR | GLOB_NOSORT) as $folder) {
    $directories[] = $folder;
    responsive_menus_glob_recursive("{$folder}/*", $directories);
  }
}