getExtension(), $extensions, true ) ) { foreach( $ignore_folders as $ignore_folder ) { if ( false !== strpos( $file->getPathname(), $ignore_folder ) ) { $ignore_file = true; } } if ( $ignore_file ) { continue; } $files[] = $file->getPathname(); } } return $files; } }