You are here

function _modernizr_scan_for_library in Modernizr 8

Same name and namespace in other branches
  1. 7.3 modernizr.module \_modernizr_scan_for_library()

Helper function to scan for acceptably named libraries

2 calls to _modernizr_scan_for_library()
modernizr_get_path in ./modernizr.module
Returns the full path of modernizr, along with the filename.
_modernizr_drush_download_dev in drush/modernizr.drush.inc
Helper function downloads the uncompressed development copy of Modernizr.

File

./modernizr.module, line 176
Main module file for Modernizr

Code

function _modernizr_scan_for_library($paths) {
  $path = '';
  foreach ($paths as $p) {
    if ($files = file_scan_directory($p, MODERNIZR_FILENAME_REGEX)) {
      $path = reset($files)->uri;
      break;
    }
  }
  return $path;
}