$bytes =
apply_filters( 'import_upload_size_limit',
wp_max_upload_size() );
$size =
size_format( $bytes );
$upload_dir =
wp_upload_dir();
if ( !
empty( $upload_dir['error'
] ) ) :
?>
<div class="error"><p><?php
_e( 'Before you can upload your import file, you will need to fix the following error:'
); ?></p>
<p><strong><?php
echo $upload_dir['error'
]; ?></strong></p></div>
<?php
else :
?>
<form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php
echo esc_url( wp_nonce_url( $action, 'import-upload'
) ); ?>">
<p>
<?php
printf( '<label for="upload">%s</label> (%s)',
__( 'Choose a file from your computer:'
),
/* translators: %s: Maximum allowed file size. */
sprintf( __( 'Maximum size: %s'
),
$size ) );
?>
<input type="file" id="upload" name="import" size="25" />
<input type="hidden" name="action" value="save" />
<input type="hidden" name="max_file_size" value="