Warn if upload dir not writable when importing. Props filosofo. fixes #8048
git-svn-id: https://develop.svn.wordpress.org/trunk@10561 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6ae1efac3c
commit
b12df4027f
|
@ -2703,6 +2703,11 @@ function wp_max_upload_size() {
|
|||
function wp_import_upload_form( $action ) {
|
||||
$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
|
||||
$size = wp_convert_bytes_to_hr( $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" action="<?php echo attribute_escape($action) ?>">
|
||||
<p>
|
||||
|
@ -2717,6 +2722,7 @@ function wp_import_upload_form( $action ) {
|
|||
</p>
|
||||
</form>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue