# clanbite_notify()

Send a notification to a user.

```php
clanbite_notify( int $user_id, string $type, string $title, array $args = array() )
```

## Parameters

- `$user_id` (int) User to notify.
- `$type` (string) Notification type slug (e.g., 'team_invite', 'friend_request').
- `$title` (string) Short notification title.
- `$args` (array<string, mixed>) Optional arguments.
  - `$message` (string) Longer message text.
  - `$url` (string) Link URL when notification is clicked.
  - `$actor_id` (int) User who triggered the notification.
  - `$object_type` (string) Related object type (e.g., 'team', 'post', 'comment').
  - `$object_id` (int) Related object ID.
  - `$data` (array) Additional data to store (will be JSON encoded).
  - `$actions` (array) Action buttons. Each action is an array with: - key: (string) Unique action identifier (e.g., 'accept', 'decline'). - label: (string) Button label. - style: (string) 'primary', 'secondary', or 'danger'. Default 'secondary'. - handler: (string) Handler identifier for the action. - status: (string) Status to set after action ('accepted', 'declined', 'dismissed'). - success_message: (string) Message to show on success. - confirm: (string|false) Confirmation message, or false for no confirm.
  - `$dedupe` (bool) If true, won't create if similar notification exists. Default true.

## Return

`int|\WP_Error` Notification ID or error.
