WP_CLI::halt
Halt script execution with a specific return code.
Permits script execution to be overloaded by WP_CLI::runcommand()
Method of the class: WP_CLI{}
No Hooks.
Returns
never.
Usage
$result = WP_CLI::halt( $return_code );
- $return_code(int) (required)
- .
WP_CLI::halt() WP CLI::halt code WP-CLI 2.13.0-alpha
public static function halt( $return_code ) {
if ( self::$capture_exit ) {
throw new ExitException( '', $return_code );
}
exit( $return_code );
}