apply_filters( 'clanbite_toast_settings', array{enabled: bool, position: string, duration_ms: int, max: int, pause_on_hover: bool, show_timer: bool} $settings )Filters the toast settings before they are used (PHP) and sent to the browser (clanbiteToastConfig).
Filter PHP
Parameters
$settings(array{enabled: bool, position: string, duration_ms: int, max: int, pause_on_hover: bool, show_timer: bool})enabled;position(a key ofclanbite_toast_positions());duration_ms(0 = until closed);max(toasts shown at once per corner);pause_on_hover(hovering pauses the countdown);show_timer(the countdown bar along the bottom of each toast).
Example
add_filter( 'clanbite_toast_settings', function ( $settings ) {
// Change $settings here.
return $settings;
}, 10, 1 );Defined in inc/toasts.php
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |