generate_hook
Generate WordPress action or filter hook code for customizing functionality in WordPress themes and plugins. Specify hook type, name, and callback to create standards-compliant code.
Instructions
Generate WordPress action or filter hook code
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"hook": "<hook>",
"callback": "<callback>"
},
"name": "generate_hook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Hook type | |
| hook | Yes | Hook name | |
| callback | Yes | Callback function name | |
| priority | No | Hook priority (default: 10) | |
| args | No | Number of arguments (default: 1) | |
| description | No | Hook description |