title: "WP_CLI\Utils\report_batch_operation_results()" post_status: publish comment_status: open taxonomy: category: - wp-cli-handbook post_tag: - Internal Api - Repos - Data
WP_CLI\Utils\report_batch_operation_results()
报告对多个资源执行相同操作的结果。
用法
WP_CLI\Utils\report_batch_operation_results( $noun, $verb, $total, $successes, $failures, $skips = null )
$noun (string) 受影响的资源(例如插件)。
$verb (string) 对资源执行的操作类型(例如激活)。
$total (integer) 受影响的资源总数。
$successes (integer) 成功操作的数量。
$failures (integer) 失败操作的数量。
$skips (null|integer) 可选。跳过操作的数量。默认为 null(不显示跳过)。
@return (void)
$verb (string) 对资源执行的操作类型(例如激活)。
$total (integer) 受影响的资源总数。
$successes (integer) 成功操作的数量。
$failures (integer) 失败操作的数量。
$skips (null|integer) 可选。跳过操作的数量。默认为 null(不显示跳过)。
@return (void)
内部 API 文档在每次发布时从 WP-CLI 代码库生成。如需改进,请提交拉取请求。
相关
- WP_CLI\Utils\launch_editor_for_input() - 启动系统的 $EDITOR 供用户编辑文本。
- WP_CLI\Utils\get_flag_value() - 返回标志值,如果未设置则返回 $default 值。
- WP_CLI\Utils\parse_str_to_argv() - 将命令行参数字符串解析为类似 $argv 的变量。
- WP_CLI::confirm() - 在执行破坏性操作前请求确认。
- WP_CLI::read_value() - 从多种格式读取值。
- WP_CLI::has_config() - 确认全局配置参数存在。
- WP_CLI::get_config() - 获取全局配置参数的值。