You are here

function flowplayer_get_path in Flowplayer API 7.2

Return the path to the Flowplayer plugins.

5 calls to flowplayer_get_path()
flowplayer_add in ./flowplayer.module
Adds a FlowPlayer element to the page.
flowplayer_admin_settings in ./flowplayer.admin.inc
Administration settings for the Flowplayer Drupal module.
_flowplayer_get_controls_swf_path in ./flowplayer.module
Get the path to the flowplayer.controls-X.X.X.swf file
_flowplayer_get_js_path in ./flowplayer.module
Get the path to the flowplayer.min.js file
_flowplayer_get_swf_path in ./flowplayer.module
Get the path to the flowplayer.swf file

File

./flowplayer.module, line 261
Provides integration with FlowPlayer.

Code

function flowplayer_get_path() {
  static $library_path = NULL;

  // Try to locate the library path in any possible setup.
  if ($library_path == NULL) {

    // First check the default location.
    $path = variable_get('flowplayer_path', FLOWPLAYER_PATH);
    if (is_dir($path)) {
      $library_path = $path;
    }
    elseif ($library_path == NULL && module_exists('libraries')) {
      if ($path = libraries_get_path('flowplayer')) {
        $library_path = $path;
        variable_set('flowplayer_path', $library_path);
      }
    }
    elseif ($library_path == NULL) {
      $library_path = FLOWPLAYER_PATH;
    }
  }
  return $library_path;
}