Description


This hook is triggered immediately before uploading a file.

Parameters


One parameter/argument is passed to this hook.

Usage


<?php add_action("wpdm_before_upload_file", "callack_function",10,1);?>

Examples


<?php
add_action("wpdm_before_upload_file", "wpdm_verify_upload",10,1); 
function download_notification($FILE){
        $ext = explode('.', $FILES['name']);
        $ext = end($ext);
        $ext = strtolower($ext);
        if($ext == 'xml') die('-3'); //if you want to block xml file upload
} 

?>

Related

Last Updated: Mar 20, 2017


Leave a Reply