Commit 05044b0c62 for wordpress.org
commit 05044b0c62c008893bec4e8328a2f48c13a7e031
Author: wildworks <wildworks@git.wordpress.org>
Date: Sat Nov 29 04:26:31 2025 +0000
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.
Built from https://develop.svn.wordpress.org/trunk@61320
git-svn-id: http://core.svn.wordpress.org/trunk@60632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index bd2f4f6872..8436bde73b 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -2285,7 +2285,7 @@ function media_upload_form( $errors = null ) {
_ex( 'Upload', 'verb' );
?>
</label>
- <input type="file" name="async-upload" id="async-upload" required />
+ <input type="file" name="async-upload" id="async-upload" />
<?php submit_button( _x( 'Upload', 'verb' ), 'primary', 'html-upload', false ); ?>
<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
</p>
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 1e80346cf6..405b6e57b2 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.0-alpha-61319';
+$wp_version = '7.0-alpha-61320';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.