array( 'label' => t('XSPF player'), 'field types' => array('nodereference'), 'multiple values' => CONTENT_HANDLE_MODULE, ), ); } /** * Implementation of hook_theme(). */ function audio_feeds_xspf_player_theme() { return array( 'audio_feeds_xspf_player_formatter_audio_feeds_xspf_player' => array( 'arguments' => array('element' => NULL, 'teaser' => FALSE), ), ); } /** * Theme function for 'audio_feeds_xspf_player' nodereference field formatter. */ function theme_audio_feeds_xspf_player_formatter_audio_feeds_xspf_player($element, $teaser = FALSE) { // Some notes: // // Perhaps we could have an admin interface for choosing the player. Any Audio // module player that has a 'theme_xspf' function can work. However, this // being a theme function, it is not hard at all to override... // // No check is made to ensure that the player actually supports the audio // format of each track in the playlist. if ($player = audio_get_players('name', 'xspf_extended')) { return theme($player['theme_xspf'], url('node/'. $element['#node']->nid .'/xspf')); } }