Public POM AI filters

These filters are the supported way to adapt public POM AI behavior. Return the same value type the filter receives.

Filter Value and additional arguments
pom_ai_settings Complete admin settings array.
pom_shortcode_translation_schema Shared map of shortcode tags to translatable attributes, inner-content policy, and parameter-group text fields.
pom_ai_language_label_from_locale Language label; also receives locale, language name, and region name.
pom_ai_dictation_max_duration Maximum recording seconds; default 180.
pom_ai_dictation_max_file_size Maximum audio bytes; default 4 MB.
pom_ai_dictation_allowed_mime_types Array of accepted audio/video-audio MIME types.
pom_ai_dictation_bits_per_second Browser recording bitrate; default 24000.
pom_ai_dictation_defaults Complete localized dictation configuration array.
pom_ai_prompt_template_context_labels Context-key to label map.
pom_ai_mcp_supported_protocol_versions Ordered supported MCP version array.
pom_ai_mcp_allowed_origins Cross-origin allowlist for MCP HTTP requests.
pom_ai_mcp_writable_options Narrow the five supported WordPress option writes; additional options are ignored.
pom_ai_mcp_writable_pom_theme_settings POM Theme setting.field allowlist; supports the server’s documented wildcard matching.

Share shortcode translation declarations

Register this filter during normal plugin or theme loading, outside builder-only hooks. POM AI and POM Translate can then discover the same text without loading WPBakery:

add_filter('pom_shortcode_translation_schema', static function (array $schema): array {
    $schema['acme_cards'] = [
        'attributes' => ['heading', 'button_label'],
        'content' => true,
        'groups' => ['items' => ['title', 'description']],
    ];
    return $schema;
});

Use lowercase names. attributes lists textual attributes; content permits enclosed prose and nested shortcodes; groups lists textual members in each row of a URL-encoded JSON array of objects. Defaults are an empty attribute list, content: true, and no groups. Set content to false for code or other technical bodies. An empty attribute list explicitly excludes all attributes. Keep IDs, URLs, CSS, enum keys, and numeric settings out of text declarations.

POM AI restores each group string with JSON and URL encoding, preserving unlisted members. Invalid groups remain unchanged. An explicit shared declaration takes precedence over legacy WPBakery flags; flags remain a fallback for third-party elements without a declaration. POM Translate's older attribute filters apply only to POM Translate.

Verify a representative translated page with nested and repeated components, quotes in text, raw HTML, and grouped values. Existing translated posts are not rewritten when a declaration changes.

Example: lower the dictation duration

add_filter(
    'pom_ai_dictation_max_duration',
    static fn(): int => 120
);

Keep paired client/server limits coherent. For example, increasing the local dictation file limit does not make the account service accept a larger upload.

Allowlist filters do not override the server's protected-field, source-code or user-administration restrictions. The WordPress option filter can only narrow its built-in list. Theme field extensions must still match native schemas and the hard safety policy; verify preview, capability, gate and accepted-value behavior.

Do not use broad wildcards for convenience. Cross-origin entries should be exact trusted origins.

Related guides: prompt-template extension, security, and tool-module extension.