Clanbite Since 1.5.0
clanbite_get_toast_settings( ): array{enabled: bool, position: string, duration_ms: int, max: int, pause_on_hover: bool, show_timer: bool}Validated toast settings (Clanbite → Settings → Notifications → Popups).
The values are stored with the Notifications settings. They keep applying, with their saved values, even if the Notifications extension is later turned off (the tab is then hidden, so they can no longer be edited).
Extensions normally do not need this: the clanbite-toasts script applies the same values in the browser. Read it to follow the site's choices from PHP (for example to decide whether to show a popup at all).
Returns
array{enabled: bool, position: string, duration_ms: int, max: int, pause_on_hover: bool, show_timer: bool} duration_ms is 0 when toasts stay until closed.
Defined in inc/toasts.php
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |