ACF\CLI
JsonCommand::log_command
Records a first-run event for a CLI sub-command.
Method of the class: JsonCommand{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->log_command( $subcommand );
- $subcommand(string) (required)
- The sub-command name (e.g.,
'status','sync','import', 'export').
Changelog
| Since 6.8 | Introduced. |
JsonCommand::log_command() JsonCommand::log command code 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 );
}
}