apply_filters( 'clanbite_toast_durations', array<string, string> $choices )Filters how long a toast can stay on screen (the choices in Settings → Notifications → Popups).
Keys are whole seconds as strings, or custom (the seconds typed into the custom length field); 0 means "until it is closed". 5 must stay in the list: it is the fallback.
Filter PHP
Parameters
$choices(array<string, string>)Seconds => translated label.
Example
add_filter( 'clanbite_toast_durations', function ( $choices ) {
// Change $choices here.
return $choices;
}, 10, 1 );Defined in inc/toasts.php
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |