wppaste
WordPress

apply_filters( 'wp_ai_client_prevent_prompt', bool $prevent, WP_AI_Client_Prompt_Builder $builder )

Since
7.0.0
Filters whether to prevent the prompt from being executed.

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

$preventbool
Whether to prevent the prompt. Default false.
$builderWP_AI_Client_Prompt_Builder
A clone of the prompt builder instance (read-only).

Where this hook fires · 1

  • wp-includes/ai-client/class-wp-ai-client-prompt-builder.php:322WP_AI_Client_Prompt_Builder::__call()

Source code

				 *				 * @since 7.0.0				 *				 * @param bool                        $prevent Whether to prevent the prompt. Default false.				 * @param WP_AI_Client_Prompt_Builder $builder A clone of the prompt builder instance (read-only).				 */				$prevent = (bool) apply_filters( 'wp_ai_client_prevent_prompt', false, clone $this );			} 			if ( $prevent ) {				// For is_supported* methods, return false.				if ( self::is_support_check_method( $name ) ) {					return false;

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.