Title: wp_supports_ai
Published: May 20, 2026

---

# wp_supports_ai(): bool

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#wp--skip-link--target)

Returns whether AI features are supported in the current environment.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#return)󠁿

 bool Whether AI features are supported.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#source)󠁿

    ```php
    function wp_supports_ai(): bool {
    	// Return early if AI is disabled by the current environment.
    	if ( defined( 'WP_AI_SUPPORT' ) && ! WP_AI_SUPPORT ) {
    		return false;
    	}

    	/**
    	 * Filters whether the current request can use AI.
    	 *
    	 * 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.
    	 *
    	 * @since 7.0.0
    	 *
    	 * @param bool $is_enabled Whether AI is available. Default to true.
    	 */
    	return (bool) apply_filters( 'wp_supports_ai', true );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ai-client.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/ai-client.php#L21)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/ai-client.php#L21-L38)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#hooks)󠁿

 [apply_filters( ‘wp_supports_ai’, bool $is_enabled )](https://developer.wordpress.org/reference/hooks/wp_supports_ai/)

Filters whether the current request can use AI.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#related)󠁿

| Uses | Description | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

| Used by | Description | 
| [_wp_connectors_init()](https://developer.wordpress.org/reference/functions/_wp_connectors_init/)`wp-includes/connectors.php` |

Initializes the connector registry with default connectors and fires the registration action.

  | 
| [WP_Connector_Registry::register()](https://developer.wordpress.org/reference/classes/wp_connector_registry/register/)`wp-includes/class-wp-connector-registry.php` |

Registers a new connector.

  | 
| [WP_AI_Client_Prompt_Builder::__call()](https://developer.wordpress.org/reference/classes/wp_ai_client_prompt_builder/__call/)`wp-includes/ai-client/class-wp-ai-client-prompt-builder.php` |

Magic method to proxy snake_case method calls to their PHP AI Client camelCase counterparts.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_supports_ai/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_supports_ai%2F)
before being able to contribute a note or feedback.