mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-21 06:39:01 +08:00
Introduce our own formatter, so we can implement custom tables
This commit is contained in:
parent
47b6968f5c
commit
919dda5637
2 changed files with 78 additions and 3 deletions
|
@ -135,7 +135,7 @@ class Command {
|
|||
$this->focus_log[ $hook ]['hook'] = '';
|
||||
}
|
||||
}
|
||||
$formatter = new \WP_CLI\Formatter( $assoc_args, $focus_fields );
|
||||
$formatter = new Formatter( $assoc_args, $focus_fields );
|
||||
$formatter->display_items( $this->focus_log );
|
||||
} else if ( $this->focus_hook ) {
|
||||
$hook_fields = array(
|
||||
|
@ -152,7 +152,7 @@ class Command {
|
|||
}
|
||||
}
|
||||
}
|
||||
$formatter = new \WP_CLI\Formatter( $assoc_args, $hook_fields );
|
||||
$formatter = new Formatter( $assoc_args, $hook_fields );
|
||||
$formatter->display_items( $this->hook_log );
|
||||
} else {
|
||||
|
||||
|
@ -164,7 +164,7 @@ class Command {
|
|||
}
|
||||
}
|
||||
}
|
||||
$formatter = new \WP_CLI\Formatter( $assoc_args, $scope_fields );
|
||||
$formatter = new Formatter( $assoc_args, $scope_fields );
|
||||
$formatter->display_items( $this->scope_log );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue