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

ftp_base::connect() public WP 1.0

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

Хуков нет.

Возвращает

Null. Ничего.

Использование

$ftp_base = new ftp_base();
$ftp_base->connect( $server );

Код ftp_base::connect() WP 5.5.1

wp-admin/includes/class-ftp.php
<?php
function connect($server=NULL) {
	if(!empty($server)) {
		if(!$this->SetServer($server)) return false;
	}
	if($this->_ready) return true;
    $this->SendMsg('Local OS : '.$this->OS_FullName[$this->OS_local]);
	if(!($this->_ftp_control_sock = $this->_connect($this->_host, $this->_port))) {
		$this->SendMSG("Error : Cannot connect to remote host \"".$this->_fullhost." :".$this->_port."\"");
		return FALSE;
	}
	$this->SendMSG("Connected to remote host \"".$this->_fullhost.":".$this->_port."\". Waiting for greeting.");
	do {
		if(!$this->_readmsg()) return FALSE;
		if(!$this->_checkCode()) return FALSE;
		$this->_lastaction=time();
	} while($this->_code<200);
	$this->_ready=true;
	$syst=$this->systype();
	if(!$syst) $this->SendMSG("Can't detect remote OS");
	else {
		if(preg_match("/win|dos|novell/i", $syst[0])) $this->OS_remote=FTP_OS_Windows;
		elseif(preg_match("/os/i", $syst[0])) $this->OS_remote=FTP_OS_Mac;
		elseif(preg_match("/(li|u)nix/i", $syst[0])) $this->OS_remote=FTP_OS_Unix;
		else $this->OS_remote=FTP_OS_Mac;
		$this->SendMSG("Remote OS: ".$this->OS_FullName[$this->OS_remote]);
	}
	if(!$this->features()) $this->SendMSG("Can't get features list. All supported - disabled");
	else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
	return TRUE;
}