Extend reusable POM AI prompt templates
POM AI’s local prompt-template system is separate from MCP prompts/list. Local templates append reusable text to prompt textareas in POM AI writing and image interfaces.
Template data
Each saved template has:
- a sanitized template ID;
- a title;
- prompt text;
- one or more supported context keys.
Built-in contexts are post_writer, text_generator, landing_generator, full_texts_copywriting, image_generator, and image_improver. Templates are sorted by title and shown only where their context matches the current interface. Selecting a template appends its prompt; it does not replace text already entered.
Add a public context
Use pom_ai_prompt_template_context_labels:
add_filter(
'pom_ai_prompt_template_context_labels',
static function ( array $contexts ): array {
$contexts['product_copy'] = __( 'Product copy', 'my-plugin' );
return $contexts;
}
);
Save and retrieve templates through the documented helpers pom_ai_save_prompt_templates(), pom_ai_get_prompt_templates(), pom_ai_get_prompt_template_by_id(), and pom_ai_get_prompt_templates_by_context(). Rendering a selector is available through pom_ai_render_prompt_template_selector() with a context and target textarea selector.
Users need edit_posts to manage templates. Validate nonces and capabilities in any custom management interface.
This filter does not register an MCP prompt. The MCP prompt catalog is currently built into POM AI.
Related guides: prompt templates, public hooks, and MCP prompt recipes.