Hooks
Every filter and action Riff fires, in PHP and in the player. Each page is generated from the docblock above the line the hook fires on, at the commit this site was published from. A hook keeps its name and parameters within a major version.
PHP filters
- riff_accent
Filters the player's accent colour, after the theme's own setting.
- riff_art_layouts
Filters the layouts a drawn cover picks from: where the record sits. The plugin knows
corner,centreandhorizon; a layout it does not know draws ascorner. - riff_art_palettes
Filters the palettes a drawn cover picks from: lists of background, accent and ink.
- riff_art_svg
Filters a drawn cover.
- riff_bar_controls
Filters the controls at the end of the bar on a wide screen.
- riff_chips
Filters the chips under Now Playing's controls.
- riff_enabled
Filters whether Riff's player loads on the current front-end request.
- riff_library_item
Filters a post as the library lists it.
- riff_library_query
Filters the query behind the library: which posts the app lists.
- riff_player_data
Filters the data handed to the player script: strings, and the addresses of scripts a feature wants loaded, such as the Listen feature's app on the page that holds its block.
- riff_sources
Filters the sources tracks are read from, keyed by id.
- riff_strings
Filters the strings the player shows.
- riff_track
Filters a track before the player reads it.
PHP actions
- riff_after_player
Fires after the player's markup.
- riff_before_player
Fires before the player's markup.
JavaScript filters
- riff.queue
Filters the tracks about to become the queue.
- riff.shortcuts
Filters whether the single-key shortcuts (Space, K, J, L) act on a key press.
- riff.track
Filters one track as a queue is set, after
riff.queue.
JavaScript actions
- riff.action
Fires when a control an extension added through
riff_chipsorriff_bar_controlsis pressed. - riff.close
Fires when Now Playing closes.
- riff.ended
Fires when a track plays to its end, before the next one loads.
- riff.open
Fires when Now Playing opens.
- riff.pause
Fires when the track pauses.
- riff.play
Fires when the track starts or resumes playing.
- riff.ready
Fires once the player is set up, its state restored and
window.riffavailable. - riff.track
Fires when a track is loaded, before it plays.
No hook matches.