Casts a vote on a post poll (same rules as REST; one vote per user).
- Ability
clanbite-social/vote-poll- Label
- Vote on social poll
- Category
- Access
- Checked by a permission callback
Input
| Property | Type | Description |
|---|---|---|
post_id required | integer | Social post ID with a poll. |
option_index required | integer | Zero-based option index. |
JSON Schema
{
"type": "object",
"properties": {
"post_id": {
"type": "integer",
"description": "Social post ID with a poll."
},
"option_index": {
"type": "integer",
"description": "Zero-based option index."
}
},
"required": [
"post_id",
"option_index"
]
}Output
Poll payload after vote (same shape as REST).
Type: object
JSON Schema
{
"type": "object",
"description": "Poll payload after vote (same shape as REST)."
}Defined in inc/Social_Kit_Abilities.php