You are here

function mp3player_init in MP3 Player 7.2

Implementation of hook_init().

File

./mp3player.module, line 41
mp3player main module file.

Code

function mp3player_init() {
  if (!file_exists(libraries_get_path('audio-player') . '/audio-player.js') || !file_exists(libraries_get_path('audio-player') . '/player.swf')) {
    drupal_set_message(t('%file1 or %file2 were not found in %directory, download the <a href="http://wpaudioplayer.com/download">standalone WordPress Audio Player</a>.', array(
      '%file1' => 'audio-player.js',
      '%file2' => 'player.swf',
      '%directory' => '/' . libraries_get_path('audio-player'),
    )), 'error');
  }
  drupal_add_js(libraries_get_path('audio-player') . '/audio-player.js');
}