функция
since 7.0.0
wp_supports_ai()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_supports_ai(): bool
Описание
Возвращает, поддерживаются ли функции ИИ в текущем окружении.
Возвращаемое значение
bool
Исходный код
wp-includes/ai-client.php:21
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 rd-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 );
}
История изменений
| Версия | Описание |
|---|---|
| 7.0.0 | Introduced. |

