Make WordPress Core

Changeset 61333


Ignore:
Timestamp:
12/01/2025 02:24:49 PM (12 days ago)
Author:
cbravobernal
Message:

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.

Reviewed by cbravobernal.
Merges [61320] to the 6.9 branch.

Props adamsilverstein, ellatrix, desrosj, huzaifaalmesbah, immeet94, krupajnanda, madhavishah01, parthvataliya, ravichudasama01, sabernhardt, wildworks, yagniksangani.
Fixes #64305.

Location:
branches/6.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.9

  • branches/6.9/src/wp-admin/includes/media.php

    r61099 r61333  
    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>
Note: See TracChangeset for help on using the changeset viewer.