Changeset 62067 for trunk/src/wp-includes/ai-client.php
- Timestamp:
- 03/19/2026 01:55:45 PM (7 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/ai-client.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ai-client.php
r61700 r62067 9 9 10 10 use WordPress\AiClient\AiClient; 11 12 /** 13 * Returns whether AI features are supported in the current environment. 14 * 15 * @since 7.0.0 16 * 17 * @return bool Whether AI features are supported. 18 */ 19 function wp_supports_ai(): bool { 20 $is_enabled = defined( 'WP_AI_SUPPORT' ) ? WP_AI_SUPPORT : true; 21 22 /** 23 * Filters whether the current request should use AI. 24 * 25 * This allows plugins and 3rd-party code to disable AI features on a per-request basis, or to even override explicit 26 * preferences defined by the site owner. 27 * 28 * @since 7.0.0 29 * 30 * @param bool $is_enabled Whether the current request should use AI. Default to WP_AI_SUPPORT constant, or true if 31 * the constant is not defined. 32 */ 33 return (bool) apply_filters( 'wp_supports_ai', $is_enabled ); 34 } 11 35 12 36 /**
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)