ACF\Site_Health

AI_Usage::log_execution │ public │ ACF 6.8.0

Log execution events (when agents execute ACF abilities).

Hooks into wp_after_execute_ability to log successful ability executions.

Метод класса: AI_Usage{}

Хуков нет.

Возвращает

void. Ничего (null).

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

$AI_Usage = new AI_Usage();
$AI_Usage->log_execution( $ability_name, $input, $result );
$ability_name(строка) (обязательный)
The namespaced ability name.
$input(разное) (обязательный)
The input data passed to the ability.
$result(разное) (обязательный)
The result returned by the ability.

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

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

Код AI_Usage::log_execution() ACF 6.8.11

public function log_execution( string $ability_name, $input, $result ) {
	// Only log ACF abilities.
	if ( strpos( $ability_name, 'acf/' ) !== 0 ) {
		return;
	}

	$is_error = $result instanceof WP_Error;

	$this->increment_execution_count( $ability_name, $is_error );
}