Alter the FileTransfer class registry.
array $filetransfer_info: Reference to a nested array containing information about the FileTransfer class registry.
function hook_filetransfer_info_alter(&$filetransfer_info) {
if (variable_get('paranoia', FALSE)) {
// Remove the FTP option entirely.
unset($filetransfer_info['ftp']);
// Make sure the SSH option is listed first.
$filetransfer_info['ssh']['weight'] = -10;
}
}