Hooks and filters

Reference for the KanbanWP actions and filters you can use in your own code, with parameters, examples, and notes on when each one fires.

Add these from a plugin or a theme’s functions.php. Every hook name starts with kanbanwp_.

Actions

ActionParametersFires
kanbanwp_initnoneAfter KanbanWP has loaded its modules.
kanbanwp_task_created$task_id, $taskAfter a task is created through the REST API or the MCP server, or by a recurring task.
kanbanwp_task_updated$task_id, $task, $changesAfter a task is updated through the REST API or the MCP server.
kanbanwp_task_moved$task_id, $task, $old_stage_id, $new_stage_idAfter a task changes stage through the REST API or the MCP server, including bulk moves.
kanbanwp_task_deleted$task_id, $board_idAfter a task is deleted through the REST API.
kanbanwp_task_assigned$task_id, $user_id, $actorAfter someone is assigned to a task.
kanbanwp_comment_added$comment_id, $commentAfter a comment is added through the REST API or the MCP server.
kanbanwp_member_added$board_id, $user_id, $roleAfter a board member is added.
kanbanwp_member_removed$board_id, $user_idAfter a board member is removed.
kanbanwp_form_submission$args (array)You fire it. KanbanWP listens and creates a task.
kanbanwp_board_created$board_idKanbanWP listens for it, but nothing in version 1.0.1 fires it.

The task and comment actions fire from the REST API and the MCP server. Changes made with WP-CLI or by calling model classes directly do not trigger them.

Creating tasks from a form

Fire kanbanwp_form_submission from any form plugin’s success hook:

do_action( 'kanbanwp_form_submission', array(
    'title'    => 'New lead: ACME Corp', // required
    'board_id' => 3,                     // required
    'stage_id' => 12,                    // optional, defaults to the first stage
    'description' => 'Asked for a quote.',
    'email'    => '[email protected]',    // appended to the description
    'name'     => 'Jane Doe',            // appended to the description
    'meta'     => array( 'source' => 'contact-form' ),
) );

If board_id is missing or invalid, nothing is created and the failure is written to the PHP error log. See Forms.

Filters

FilterParametersPurpose
kanbanwp_ai_system_prompt$system, $argsChange the system prompt for every AI call.
kanbanwp_ai_allowed$allowed, $user_idReturn true or false to override who may use AI. null keeps the default role check.
kanbanwp_mcp_tool_result$result, $tool, $argsChange MCP tool output before it is returned. Tools: list_boards, get_board, list_tasks, create_task, update_task, move_task, add_comment.
kanbanwp_webhook_payload$payload, $event, $webhookChange an outgoing webhook payload before it is signed and sent.
kanbanwp_webhook_events$eventsRegister extra webhook event keys.
kanbanwp_board_url$url, $board_id, $task_idChange the board link used in notifications and linked posts.
kanbanwp_public_board_url$url, $board_id, $tokenChange the generated public link.
kanbanwp_admin_parent_slug$slugChange the admin menu that KanbanWP’s sub-pages attach to. Default kanbanwp.
kanbanwp_import_drafts_post_types$post_typesPost types offered for importing drafts. Default post and page.

Examples

add_filter( 'kanbanwp_ai_system_prompt', function ( $system, $args ) {
    return $system . "\nAlways reply in American English.";
}, 10, 2 );

add_filter( 'kanbanwp_ai_allowed', function ( $allowed, $user_id ) {
    return user_can( $user_id, 'edit_posts' ) ? true : $allowed;
}, 10, 2 );

Webhook events

Event keys use underscores, not dots: task_created, task_updated, task_moved, task_deleted, comment_added and board_created. The payload contains event, site, board_id, task_id, data and sent_at. The webhook object passed to the filter includes its secret, so never log it. Since nothing fires kanbanwp_board_created in 1.0.1, the board_created webhook does not currently send. See Webhooks.

Last updated October 13, 2026

Get KanbanWP updates

Release notes, new features and kanban guides, straight to your inbox. We write when something ships, not on a schedule.