8.5.x file.api.php hook_filetransfer_info_alter(&$filetransfer_info)
8.0.x file.api.php hook_filetransfer_info_alter(&$filetransfer_info)
8.1.x file.api.php hook_filetransfer_info_alter(&$filetransfer_info)
8.2.x file.api.php hook_filetransfer_info_alter(&$filetransfer_info)
8.3.x file.api.php hook_filetransfer_info_alter(&$filetransfer_info)
8.4.x file.api.php hook_filetransfer_info_alter(&$filetransfer_info)
8.6.x file.api.php hook_filetransfer_info_alter(&$filetransfer_info)
7.x system.api.php hook_filetransfer_info_alter(&$filetransfer_info)

Alter the FileTransfer class registry.

Parameters

array $filetransfer_info: Reference to a nested array containing information about the FileTransfer class registry.

See also

hook_filetransfer_info()

Related topics

1 invocation of hook_filetransfer_info_alter()
drupal_get_filetransfer_info in includes/common.inc
Assembles the Drupal FileTransfer registry.

File

modules/system/system.api.php, line 4811
Hooks provided by Drupal core and the System module.

Code

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;
  }
}