• 1.
    class Your_Class extends GW_Rename_Uploaded_Files {
  • 2.
     
  • 3.
        function is_applicable_form( $form ) {
  • 4.
            foreach ( $form['fields'] as $field ) {
  • 5.
                if($field->type =='fileupload'){return true;}
  • 6.
            }
  • 7.
            return false; 
  • 8.
    	       
  • 9.
        }
  • 10.
        
  • 11.
        function is_applicable_field( $field ) {
  • 12.
            
  • 13.
            $is_file_upload_field   = in_array( GFFormsModel::get_input_type( $field ), array( 'fileupload', 'post_image' ) );
  • 14.
            return $is_file_upload_field;
  • 15.
        }
  • 16.
     
  • 17.
    }
  • 18.
     
  • 19.
    new Your_Class();
class Your_Class extends GW_Rename_Uploaded_Files { function is_applicable_form( $form ) { foreach ( $form['fields'] as $field ) { if($field->type =='fileupload'){return true;} } return false; } function is_applicable_field( $field ) { $is_file_upload_field = in_array( GFFormsModel::get_input_type( $field ), array( 'fileupload', 'post_image' ) ); return $is_file_upload_field; } } new Your_Class();

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter