Developers
Filters, hooks and constants for customising Contexta — post types, internal links, commerce checks, product sync and rate limits.
Developers
Contexta is built to be adjusted without touching plugin files. Everything below is a
standard WordPress filter — put these in your theme's functions.php or a small
site-specific plugin.
Content and post types
rm_supported_post_types
Which post types appear in the editor sidebar.
add_filter( 'rm_supported_post_types', function ( $types ) {
$types[] = 'portfolio';
return $types;
} );
rm_editorial_post_types
Which post types are treated as editorial content (articles) rather than products, affecting how prompts are built.
the_content
Standard WordPress. Contexta's front-end CTA output respects it.
Internal links
rm_internal_links_limit
Maximum number of link suggestions returned per article.
add_filter( 'rm_internal_links_limit', fn() => 8 );
rm_internal_links_min_score
Minimum relevance score a candidate must reach to be suggested. Raise it for fewer, stronger matches.
rm_slug_stopwords
Words ignored when extracting keywords from titles and slugs. Ships with stopwords for French, English, Arabic, Spanish, German, Portuguese and Dutch — extend it for your language.
add_filter( 'rm_slug_stopwords', function ( $words ) {
return array_merge( $words, [ 'nuovo', 'della' ] );
} );
Commerce
rm_commerce_checks
Which product checks run in the readiness audit.
// Skip the weight check — shipping data lives in another system.
add_filter( 'rm_commerce_checks', function ( $checks ) {
return array_diff( $checks, [ 'weight' ] );
} );
Valid names: image, price, description, short_desc, category, gtin, brand,
weight.
rm_commerce_audit_limit
How many products a single audit pass covers.
rm_commerce_field_threshold
The minimum length before a description counts as thin.
rm_product_sync_config
The post type, meta keys and taxonomy Contexta reads products from. Override this to support a non-WooCommerce shop plugin.
rm_product_sync_limit / rm_product_context_limit
How many products are synced into memory, and how many can be referenced in a single prompt.
AI and prompts
rm_anthropic_api_key
Supply the API key programmatically — useful for storing it in an environment variable instead of the database.
add_filter( 'rm_anthropic_api_key', fn() => getenv( 'ANTHROPIC_API_KEY' ) );
rm_claude_model
Force a model, ignoring the setting.
rm_claude_model_choices
Add or remove models from the Settings dropdown.
rm_memory_char_budget
Character budget for the site-memory context block injected into each prompt.
rm_ai_rate_limit_per_hour
Override the per-user hourly AI action cap.
// Unlimited for administrators, default for everyone else.
add_filter( 'rm_ai_rate_limit_per_hour', function ( $limit ) {
return current_user_can( 'manage_options' ) ? 0 : $limit;
} );
contexta_competitor_ttl_days
How long competitor research stays fresh. Default 30 days.
Search Console import
rm_gsc_header_aliases
Extra column-header names to recognise when parsing a CSV. Contexta already handles many languages; add yours if an export isn't recognised.
add_filter( 'rm_gsc_header_aliases', function ( $aliases ) {
$aliases['clicks'][] = 'klikk';
return $aliases;
} );
Indexing
contexta_instant_index_submit
Return false to skip IndexNow submission for a specific URL.
add_filter( 'contexta_instant_index_submit', function ( $submit, $url ) {
return strpos( $url, '/private/' ) === false;
}, 10, 2 );
Language and branding
rm_site_language_name
Override the detected language name sent to the AI.
contexta_plugin_display_name
Rebrand the plugin's display name in the admin. The product name is deliberately not translatable — this filter is the supported way to change it.
Licensing
contexta_license_api
Point the licence client at a different API base. Mostly useful for staging.
add_filter( 'contexta_license_api', fn() => 'https://staging-api.example.com' );
Constants
| Constant | Purpose |
|---|---|
RM_VER | Plugin version |
RM_DIR / RM_URL | Plugin path and URL |
RM_BRAND | Product name |
RM_PRODUCT_SLUG | Product slug used with the licence server |
RM_LICENSE_API | Optional override of the licence API base |
Third-party integrations
Contexta detects and works with these automatically — no configuration:
- SEO plugins — Yoast SEO, Rank Math, All in One SEO, SEOPress, The SEO Framework, Slim SEO
- WPML — translations are detected, and Google submission can cover every language version
- WooCommerce — product catalogue for memory, CTAs and the commerce audit
- WordPress 7.0 Connectors — a site-wide Anthropic key
Data storage
Everything lives in your own database: options prefixed rm_, post meta prefixed _rm_,
and transients prefixed rm_. uninstall.php removes all of it when the plugin is deleted
through WordPress.