Clanbite Social Kit Abilities

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

PropertyTypeDescription
post_id requiredintegerSocial post ID with a poll.
option_index requiredintegerZero-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