跳转到主要内容

WP_CLI::halt()

Halt script execution with a specific return code.


Usage

WP_CLI::halt( $return_code )
$return_code (integer)
@return (never)

Notes

Permits script execution to be overloaded by WP_CLI::runcommand()

When --debug is enabled, this method will also output a backtrace showing where the halt was triggered from, making it easier to identify the cause of early termination.

Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.