function IIRS_0_recurse_directory($base_dir) { $files = array(); foreach (scandir($base_dir) as $file) { if ($file == '.' || $file == '..' || empty($file) || $file[0] == '.' || $file == 'read_translations.php' || $file == 'generated_fake_translations.php') { continue; } $full_path = $base_dir . DIRECTORY_SEPARATOR . $file; if (is_dir($full_path)) { $files = array_merge($files, IIRS_0_recurse_directory($full_path)); } else { $last_dot_part = strrchr($file, '.'); if ($last_dot_part === FALSE) { continue; } $extension = substr($last_dot_part, 1); if ($extension == 'js' || $extension == 'txt' || $extension == 'po' || $extension == 'mo') { continue; } array_push($files, $full_path); } } return $files; }
function IIRS_0_recurse_directory($base_dir) { $files = array(); foreach (scandir($base_dir) as $file) { if (!(empty($file) || $file == '.' || $file == '..' || $file[0] == '.' || $file == 'jquery' || ($file == 'IIRS_common' || $include_common))) { $full_path = $base_dir . DIRECTORY_SEPARATOR . $file; if (is_dir($full_path)) { $files = array_merge($files, IIRS_0_recurse_directory($full_path)); } else { if ($extension = substr(strrchr($file, '.'), 1)) { if ($extension == 'js' || $extension == 'php') { array_push($files, $full_path); } } } } } return $files; }