Changeset 62239
- Timestamp:
- 04/16/2026 07:37:31 AM (5 weeks ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/ai-client.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ai-client.php
r62067 r62239 18 18 */ 19 19 function wp_supports_ai(): bool { 20 $is_enabled = defined( 'WP_AI_SUPPORT' ) ? WP_AI_SUPPORT : true; 20 // Return early if AI is disabled by the current environment. 21 if ( defined( 'WP_AI_SUPPORT' ) && ! WP_AI_SUPPORT ) { 22 return false; 23 } 21 24 22 25 /** 23 * Filters whether the current request shoulduse AI.26 * Filters whether the current request can use AI. 24 27 * 25 28 * This allows plugins and 3rd-party code to disable AI features on a per-request basis, or to even override explicit … … 28 31 * @since 7.0.0 29 32 * 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. 33 * @param bool $is_enabled Whether AI is available. Default to true. 32 34 */ 33 return (bool) apply_filters( 'wp_supports_ai', $is_enabled);35 return (bool) apply_filters( 'wp_supports_ai', true ); 34 36 } 35 37
Note: See TracChangeset
for help on using the changeset viewer.