wppaste
WordPress

do_action( "wp_ai_client_{$event_name}", object $event )

Since
7.0.0
Fires when an AI client event is dispatched.

Description

The dynamic portion of the hook name, $event_name, refers to the snake_case version of the event class name, without the _event suffix.

For example, an event class named BeforeGenerateResultEvent will fire the wp_ai_client_before_generate_result action hook.

In practice, the available action hook names are:

  • wp_ai_client_before_generate_result
  • wp_ai_client_after_generate_result

Compatibility

WordPress
since 7.0.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in 2 of the 5 tracked releases, added in 7.0.0.

Parameters

$eventobject
The event object.

Where this hook fires · 1

  • wp-includes/ai-client/adapters/class-wp-ai-client-event-dispatcher.php:56WP_AI_Client_Event_Dispatcher::dispatch()

Source code

		 * - wp_ai_client_after_generate_result		 *		 * @since 7.0.0		 *		 * @param object $event The event object.		 */		do_action( "wp_ai_client_{$event_name}", $event ); 		return $event;	} 	/**	 * Converts an event object class name to a WordPress action hook name portion.

Changelog

Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.

  1. 7.0.4
  2. 7.1.0

Signature, return type and hooks compared across 2 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.