You are here

function _emfield_autodiscover_path in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 6.2 emfield.module \_emfield_autodiscover_path()

Search site library paths for the specific pattern.

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

File

deprecated/emfield-deprecated.inc, line 900
Functionality to be deprecated from earlier versions of Embedded Media Field.

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;
    }
  }
}