ACF\CLI

JsonCommand::log_commandprivateACF 6.8

Records a first-run event for a CLI sub-command.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->log_command( $subcommand );
$subcommand(строка) (обязательный)
The sub-command name (e.g., 'status', 'sync', 'import', 'export').

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

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

Код JsonCommand::log_command() ACF 6.8.8

private function log_command( $subcommand ) {
	$site_health = acf_get_instance( 'ACF\Site_Health\Site_Health' );

	if ( method_exists( $site_health, 'log_cli_command' ) ) {
		$site_health->log_cli_command( 'acf json ' . $subcommand );
	}
}