wppaste
WordPress

apply_filters( 'wp_supports_ai', bool $is_enabled )

Since
7.0.0
Filters whether the current request can use AI.

Description

This allows plugins and 3rd-party code to disable AI features on a per-request basis, or to even override explicit preferences defined by the site owner.

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

$is_enabledbool
Whether AI is available. Default to true.

Where this hook fires · 1

  • wp-includes/ai-client.php:37wp_supports_ai()

Source code

	 * preferences defined by the site owner.	 *	 * @since 7.0.0	 *	 * @param bool $is_enabled Whether AI is available. Default to true.	 */	return (bool) apply_filters( 'wp_supports_ai', true );} /** * Creates a new AI prompt builder using the default provider registry. * * This is the main entry point for generating AI content in WordPress. It returns

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.