Clanbite JavaScript Since 1.5.0
wp.hooks.doAction( 'clanbite.toasts.dismissed', {{id: string, element: HTMLElement}} handle, Object payload, string reason )Fires after a toast is dismissed.
Action JavaScript
Parameters
$handle({{id: string, element: HTMLElement}})The toast handle.
$payload(Object)Toast options.
$reason(string)timeout,close,escape,action,replaced,overfloworapi.
Example
wp.hooks.addAction( 'clanbite.toasts.dismissed', 'my-plugin/handler', function ( handle, payload, reason ) {
} );Defined in assets/js/clanbite-toasts.js
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |