Description

Action that fires before files are uploaded.


Passes the Form ID and a single element of the $_FILES array.


Parameters

$form_id

(int) (optional) The form ID

Default: the form ID


$file

(array) (optional) The $_FILES array

Default: the $_FILES array


Examples

   

add_action( 'vfbp_before_upload', 'filter_vfbp_before_upload', 10, 2 );

function filter_vfbp_before_upload( $form_id, $file ) {
	// execute some custom code here
}