Widget hooks
This page lists the 2 hooks of this group. Each entry shows its type, the version it arrived in, where it runs, its arguments and a starting point.
addochat_show_widget
FilterSince 0.1.0 Runs in src/Frontend/Widget.php.
Filters whether the chat shows on this request. Runs per URL; the answer may end up in a page cache, so decide on the URL, not on the visitor.
| Argument | Type | Description |
|---|---|---|
$show | bool | Whether it shows. |
$settings | array<string, mixed> | Effective settings. |
add_filter( 'addochat_show_widget', function ( $show, $settings ) {
return $show;
}, 10, 2 );
addochat_widget_config
FilterSince 0.1.0 Runs in src/Frontend/Widget.php.
Filters the widget config. It is printed in the page and may be cached: never add user data.
| Argument | Type | Description |
|---|---|---|
$config | array<string, mixed> | Config. |
$settings | array<string, mixed> | Effective settings. |
add_filter( 'addochat_widget_config', function ( $config, $settings ) {
return $config;
}, 10, 2 );