da_r_before_insert_user_reaction
Location
DaReactions\Data::insertUserReaction
Triggered before inserting a new reaction by a user.
Parameters:
$item_id(int|string): The ID of the item.$item_type(string): The type of the item.$reaction(string): The reaction being added.
Example:
add_action('da_r_before_insert_user_reaction', function($item_id, $item_type, $reaction) {
error_log("User is adding reaction '$reaction' to item $item_id of type $item_type.");
});
Use Case:
Validate the reaction or notify administrators before insertion.