wp_ai_client_prevent_prompt хук-фильтрWP 7.0.0

Filters whether to prevent the prompt from being executed.

Использование

add_filter( 'wp_ai_client_prevent_prompt', 'wp_kama_ai_client_prevent_prompt_filter', 10, 2 );

/**
 * Function for `wp_ai_client_prevent_prompt` filter-hook.
 * 
 * @param bool                        $prevent Whether to prevent the prompt.
 * @param WP_AI_Client_Prompt_Builder $builder A clone of the prompt builder instance (read-only).
 *
 * @return bool
 */
function wp_kama_ai_client_prevent_prompt_filter( $prevent, $builder ){

	// filter...
	return $prevent;
}
$prevent(true|false)
Whether to prevent the prompt.
По умолчанию: false
$builder(WP_AI_Client_Prompt_Builder)
A clone of the prompt builder instance (read-only).

Список изменений

С версии 7.0.0 Введена.

Где вызывается хук

WP_AI_Client_Prompt_Builder::__call()
wp_ai_client_prevent_prompt
wp-includes/ai-client/class-wp-ai-client-prompt-builder.php 322
$prevent = (bool) apply_filters( 'wp_ai_client_prevent_prompt', false, clone $this );

Где используется хук в WordPress

Использование не найдено.