wp_supports_ai хук-фильтрWP 7.0.0

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.

Использование

add_filter( 'wp_supports_ai', 'wp_kama_supports_ai_filter' );

/**
 * Function for `wp_supports_ai` filter-hook.
 * 
 * @param bool $is_enabled Whether AI is available.
 *
 * @return bool
 */
function wp_kama_supports_ai_filter( $is_enabled ){

	// filter...
	return $is_enabled;
}
$is_enabled(true|false)
Whether AI is available.
По умолчанию: true

Список изменений

С версии 7.0.0 Введена.

Где вызывается хук

wp_supports_ai()
wp_supports_ai
wp-includes/ai-client.php 37
return (bool) apply_filters( 'wp_supports_ai', true );

Где используется хук в WordPress

Использование не найдено.