benecaster_ai_search_after_pin_save
Fires after a pinned result was created or changed on Show Settings → AI Search (or through the pins REST routes), only once the write succeeded.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$pin |
array |
— | The pin as stored: `{ id, show_id, keyword, post_id, active, priority, created_at }`, `created_at` in UTC |
$created |
bool |
— | `true` for a new pin, `false` for a change |
Example
add_action( 'benecaster_ai_search_after_pin_save', function ( array $pin, bool $created ): void {
if ( $created ) {
my_plugin_notify_team( sprintf( 'New pin on show %d: "%s"', $pin['show_id'], $pin['keyword'] ) );
}
}, 10, 2 );
Notes
Walkthrough: Manage or change AI Search's pinned results.
Affects
- Show Settings → AI Search
Need this built rather than just documented? See our services →