1 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
Related topics
File
- core/
modules/ system/ system.api.php, line 4166 - Hooks provided by Backdrop core and the System module.
Code
function hook_filetransfer_info_alter(&$filetransfer_info) {
if (config_get('my_module.settings', 'paranoia')) {
// Remove the FTP option entirely.
unset($filetransfer_info['ftp']);
// Make sure the SSH option is listed first.
$filetransfer_info['ssh']['weight'] = -10;
}
}