Skip to main content

Filter: gk/block-mcp/agent/reassign-to

Choose who inherits the agent's content when its account is deleted.

When the agent user is removed on uninstall, everything it authored needs a new owner. By default that's the first administrator on the site — but you rarely want a bot's portfolio dumped on whoever happens to be admin #1. Point this at a dedicated editorial owner so the byline stays meaningful and nothing is orphaned. Return 0 to keep the default behaviour.

Parameters

NameTypeDescription
$reassign_tointTarget user ID, or 0 to use the first administrator. Default 0.

Example

// Hand the agent's posts to your managing editor (user ID 42).

add_filter( 'gk/block-mcp/agent/reassign-to', function () {
return 42;
} );

Since

Source

Defined in wordpress-plugin/gk-block-api/includes/class-agent-provisioner.php at line 361