wp_import_upload_form [ WordPress Function ]
wp_import_upload_form ( $action )
| Parameters: |
|
| Defined at: |
|
Soorgelijke functies: wp_import_handle_upload, media_upload_form, wp_upload_dir, wp_import_cleanup, wp_media_insert_url_form
Outputs the form used by the importers to accept the data to be imported
Source
<?php
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 esc_attr(wp_nonce_url($action, 'import-upload')); ?>">
<p>
<label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('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="<?php echo $bytes; ?>" />
</p>
<?php submit_button( __('Upload file and import'), 'button' ); ?>
</form>
<?php
endif;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_import_upload_form
Function and Method Cross Reference. wp_import_upload_form(). Defined at: / wp-admin/includes/template.php -> line 822. No references found.
phpxref.ftwr.co.uk - wp_import_upload_form (WordPress Function) - WPSeek.com
WordPress lookup for wp_import_upload_form, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - [Plugin: WordPress Importer] Import .5 failing to Post to Step1
If the call to the function wp_import_upload_form is changed to be any other URL , the form will post to it, however, posting to Step1 fails. Not only does it fail, ...
wordpress.org - Nazgul on WordPress » Archive for Tutorials
... dispatch() { if (empty ($_GET['step'])) $step = 0; else $step = (int) $_GET['step']; switch ($step) { case 0 : wp_import_upload_form('admin.php?import='.
wordpress.nazgul.nu