Skip to content

Commit 381ac16

Browse files
committed
Removes the filter that removed gf max files validation
1 parent f687ce7 commit 381ac16

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

includes/extensions/edit-entry/class-edit-entry-render.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,6 @@ function load() {
156156
// Disable conditional logic if needed (since 1.9)
157157
add_filter( 'gform_has_conditional_logic', array( $this, 'manage_conditional_logic' ), 10, 2 );
158158

159-
// Make sure GF doesn't validate max files (since 1.9)
160-
add_filter( 'gform_plupload_settings', array( $this, 'modify_fileupload_settings' ), 10, 3 );
161-
162159
// Add fields expected by GFFormDisplay::validate()
163160
add_filter( 'gform_pre_validation', array( $this, 'gform_pre_validation' ) );
164161

@@ -635,26 +632,6 @@ public function save_field_value( $value = '', $entry = array(), $field = null,
635632
return $value;
636633
}
637634

638-
/**
639-
* Remove max_files validation (done on gravityforms.js) to avoid conflicts with GravityView
640-
* Late validation done on self::custom_validation
641-
*
642-
* @param $plupload_init array Plupload settings
643-
* @param $form_id
644-
* @param $instance
645-
* @return mixed
646-
*/
647-
public function modify_fileupload_settings( $plupload_init, $form_id, $instance ) {
648-
if ( ! $this->is_edit_entry() ) {
649-
return $plupload_init;
650-
}
651-
652-
$plupload_init['gf_vars']['max_files'] = 0;
653-
654-
return $plupload_init;
655-
}
656-
657-
658635
/**
659636
* Set visibility to visible and convert field input key to string
660637
*

0 commit comments

Comments
 (0)