Skip to content

Commit 3423501

Browse files
committed
Media: Remove required attribute from media uploader file input field.
This commit removes the `required` attribute from the file input element in the media uploader to avoid browser form validation issues and ensure that the `form` element is submitted correctly. Props adamsilverstein, ellatrix, desrosj, huzaifaalmesbah, immeet94, krupajnanda, madhavishah01, parthvataliya, ravichudasama01, sabernhardt, wildworks, yagniksangani. Fixes #64305. git-svn-id: https://develop.svn.wordpress.org/trunk@61320 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f44545e commit 3423501

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/includes/media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ function media_upload_form( $errors = null ) {
22852285
_ex( 'Upload', 'verb' );
22862286
?>
22872287
</label>
2288-
<input type="file" name="async-upload" id="async-upload" required />
2288+
<input type="file" name="async-upload" id="async-upload" />
22892289
<?php submit_button( _x( 'Upload', 'verb' ), 'primary', 'html-upload', false ); ?>
22902290
<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
22912291
</p>

0 commit comments

Comments
 (0)