Kanalen hooks
Deze pagina toont de 3 hooks van deze groep. Elke hook laat zijn type zien, de versie waarin hij verscheen, waar hij draait, zijn argumenten en een beginpunt.
addochat_channel_reply
ActionSinds 0.1.0 Draait in src/Channel/Missive.php.
Gaat af nadat een collega vanuit een kanaal heeft geantwoord.
| Argument | Type | Beschrijving |
|---|---|---|
$channel | string | Id van het kanaal. |
$conversation | array<string, mixed> | Rij van het gesprek. |
$user_id | int | WordPress-gebruiker, 0 als de auteur er geen heeft. |
add_action( 'addochat_channel_reply', function ( $channel, $conversation, $user_id ) {
// ...
}, 10, 3 );
addochat_channels
FilterSinds 0.1.0 Draait in src/Channel/Channels.php.
Filtert de kanalen waaruit collega's kunnen antwoorden. Voeg een object toe dat \Addochat\Channel\Channel implementeert (bijvoorbeeld Slack); de webhook staat op addochat/v1/channel/<id>.
| Argument | Type | Beschrijving |
|---|---|---|
$channels | array<int, \Addochat\Channel\Channel> | Kanalen. |
add_filter( 'addochat_channels', function ( $channels ) {
return $channels;
} );
addochat_network_failed
ActionSinds 0.1.0 Draait in src/Channel/Missive.php.
Gaat af als een verzoek aan een andere site mislukt.
| Argument | Type | Beschrijving |
|---|---|---|
$path | string | API path. |
$error | string | Fout. |
add_action( 'addochat_network_failed', function ( $path, $error ) {
// ...
}, 10, 2 );