Clanbite Social Kit Since 1.6.2

clanbite_social_kit_toggle_reaction( string $object_type, int $object_id, int $user_id, string $slug ): array<string, mixed>|\WP_Error

Toggle a reaction on any registered object type, with every check and shared hook applied.

Namespace: Kernowdev\ClanbiteSocialKit

Parameters

$object_type (string) Required

Registered object type.

$object_id (int) Required

Object ID.

$user_id (int) Required

Reacting user.

$slug (string) Required

Reaction type slug.

Returns

array<string, mixed>|\WP_Error New state or an error with an HTTP status.

Defined in inc/functions.php

Changelog

VersionDescription
1.6.2Introduced.