WP_CLI\Utils

replace_wp_die_handler()WP-CLI 1.0

phpcs:enable

No Hooks.

Return

null. Nothing.

Usage

replace_wp_die_handler();

replace_wp_die_handler() code WP-CLI 2.7.0-alpha

function replace_wp_die_handler() {
	\remove_filter( 'wp_die_handler', '_default_wp_die_handler' );
	\add_filter(
		'wp_die_handler',
		function() {
			return __NAMESPACE__ . '\\wp_die_handler';
		}
	);
}