Skip to content

ai_assistant_welcome_tip_rules

github-actions[bot] edited this page May 19, 2026 · 1 revision

Filter URL-scoped tip rules shown in the welcome area.

Each rule should include a message and either url_component, component, path, or url. URL/path values are matched by first path component only: a rule for my-apps matches /my-apps/, /my-apps/?tab=one, and /my-apps/item/, but not /my-apps-other/.

Example

add_filter( 'ai_assistant_welcome_tip_rules', function ( $rules ) {
    $rules['my-plugin/invoices'] = [
        'url_component' => 'my-apps',
        'message'       => 'Tip: Ask me to create an invoice or summarize overdue payments.',
        'priority'      => 20,
    ];
    return $rules;
} );

Parameters

  • array<string,array<string,mixed>> $rules Tip rules keyed by stable IDs.
  • array<string,mixed> $context Current UI context.

Returns

array<string,array<string,mixed>> Filtered tip rules.

Files

apply_filters('ai_assistant_welcome_tip_rules', [], $context)

← All Hooks

Clone this wiki locally