You are here

function emfield_check_for_deprecated_modules in Embedded Media Field 6.3

Legacy support for deprecated functionality.

If we're using a deprecated module, which expects emfield to support version 1 or 2 functionality, then we need to include the legacy functions.

Parameters

boolean $reset: If TRUE, then reset our static variable and recheck for the requirement.

Return value

boolean Return TRUE if we loaded the legacy support.

2 calls to emfield_check_for_deprecated_modules()
emfield_menu in ./emfield.module
Implementation of hook_menu().
emfield_theme in ./emfield.module
Implementation of hook_theme().

File

./emfield.module, line 323
Embedded Media Field is a CCK-based framework for embedding media files.

Code

function emfield_check_for_deprecated_modules($reset = FALSE) {
  static $support_legacy;
  if (!isset($support_legacy) || $reset) {
    $support_legacy = FALSE;
    foreach (array(
      'emvideo',
      'emimage',
      'emaudio',
      'emwave',
    ) as $module) {
      if (module_exists($module)) {
        module_load_include('inc', 'emfield', 'deprecated/emfield-deprecated');
        return $support_legacy = TRUE;
      }
    }
  }
  return $support_legacy;
}