You are here

function _emfield_autodiscover_path in Embedded Media Field 6.2

Same name and namespace in other branches
  1. 6.3 deprecated/emfield-deprecated.inc \_emfield_autodiscover_path()

Search site library paths for the specific pattern.

2 calls to _emfield_autodiscover_path()
emfield_flvmediaplayer_url in ./emfield.module
Returns the URL to the registered JW Flash Media Player, if such exists.
emfield_imagerotator_url in ./emfield.module
Returns the URL to the registered JW Image Rotator, if such exists.

File

./emfield.module, line 841
Embedded Media Field is a CCK-based framework for 3rd party media files.

Code

function _emfield_autodiscover_path($pattern) {
  foreach (array(
    'libraries',
    'plugins',
    'modules',
  ) as $folder) {
    $files = drupal_system_listing($pattern, $folder, 'basename', 0);
    if (!empty($files)) {
      $file = array_pop($files);
      return $file->filename;
    }
  }
}