Clanbite JavaScript Since 1.5.0
wp.hooks.applyFilters( 'clanbite.toasts.allowedUrl', boolean allowed, string url, string context )Filters whether a URL may be used in a toast (icon image or action link).
The default allows http(s):// and root-relative URLs only. Return true to allow another scheme you trust (for example a data: image), or false to block a host.
Filter JavaScript
Parameters
$allowed(boolean)Default decision.
$url(string)The URL.
$context(string)iconoraction.
Example
wp.hooks.addFilter( 'clanbite.toasts.allowedUrl', 'my-plugin/handler', function ( allowed, url, context ) {
return allowed;
} );Defined in assets/js/clanbite-toasts.js
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |