You are here

function osmplayer_get_plugins in MediaFront 7.2

Returns all of the osmplayer plugins.

Return value

string

1 call to osmplayer_get_plugins()
osmplayer_osmplayer_info in players/osmplayer/osmplayer.module
Implementation of hook_osmplayer_player_info

File

players/osmplayer/osmplayer.module, line 929

Code

function osmplayer_get_plugins($base_path) {
  $plugins = array();
  $path = getcwd() . '/' . $base_path . '/*';
  foreach (osmplayer_get_resources($path, $base_path) as $name => $resources) {
    $info = drupal_parse_info_file($resources['path'] . '/' . $name . '.info');
    $plugins[$name] = array(
      'title' => !empty($info['name']) ? $info['name'] : '',
      'description' => !empty($info['description']) ? $info['description'] : '',
      'path' => $resources['path'],
      'css' => $resources['css'],
      'js' => $resources['js'],
      'preview' => array_pop($resources['images']),
    );
  }
  return $plugins;
}