You are here

public function Mp3playerSubscriber::check_mp3player_files in MP3 Player 8

File

src/EventSubscriber/Mp3playerSubscriber.php, line 16

Class

Mp3playerSubscriber

Namespace

Drupal\mp3player\EventSubscriber

Code

public function check_mp3player_files() {
  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');
  }
}