Filters a track before the player reads it.
Parameters
$trackarray- Track: id, src, type, title, artist, album, duration, art, video, post.
$attachment_idint- Attachment ID, or 0 for a file outside the Media Library.
$post_idint- The post the track appears in, or 0.
More Information
Usage
add_filter( 'riff_track', function ( $track, $attachment_id, $post_id ) {
return $track;
}, 10, 3 );Source
return self::normalize( (array) apply_filters( 'riff_track', $track, $attachment_id, $post_id ) );plugins/riff/src/class-tracks.phpView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |