WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_CLI::launch() public WP-CLI 1.0

Launch an arbitrary external process that takes over I/O.

# `wp core download` falls back to the `tar` binary when PharData isn't available
if ( ! class_exists( 'PharData' ) ) {
	$cmd = "tar xz --strip-components=1 --directory=%s -f $tarball";
	WP_CLI::launch( Utils\esc_cmd( $cmd, $dest ) );

{} Это метод класса: WP_CLI{}

Хуков нет.


int|ProcessRun. The command exit status, or a ProcessRun object for full details.


$result = WP_CLI::launch( $command, $exit_on_error, $return_detailed );
$command(строка) (обязательный)
External process to launch.
Whether to exit if the command returns an elevated return code.
По умолчанию: true
Whether to return an exit status (default) or detailed execution results.
По умолчанию: false

Код WP_CLI::launch() WP-CLI 2.5.0

public static function launch( $command, $exit_on_error = true, $return_detailed = false ) {
	Utils\check_proc_available( 'launch' );

	$proc    = Process::create( $command );
	$results = $proc->run();

	if ( -1 === $results->return_code ) {
		self::warning( "Spawned process returned exit code {$results->return_code}, which could be caused by a custom compiled version of PHP that uses the --enable-sigchild option." );

	if ( $results->return_code && $exit_on_error ) {
		exit( $results->return_code );

	if ( $return_detailed ) {
		return $results;

	return $results->return_code;