Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -2277,6 +2277,8 @@ function media_upload_form( $errors = null ) {
*/
do_action( 'pre-html-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

$current_screen = get_current_screen();
$required = $current_screen && 'media' === $current_screen->id ? ' required' : '';
Comment thread
adamsilverstein marked this conversation as resolved.
?>
<p id="async-upload-wrap">
<label class="screen-reader-text" for="async-upload">
Expand All @@ -2285,7 +2287,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 echo $required; ?> />
Comment thread
adamsilverstein marked this conversation as resolved.
<?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>
Expand Down
Loading