$form_class .= ' html-uploader';
} ?>
<form enctype="multipart/form-data" method="post" action="<?php
echo esc_url( $form_action_url ); ?>" class="<?php
echo $form_class; ?>" id="<?php
echo $type; ?>-form">
<?php
submit_button( '', 'hidden', 'save', false
); ?>
<input type="hidden" name="post_id" id="post_id" value="<?php
echo (int) $post_id; ?>" />
<?php
wp_nonce_field( 'media-form'
); ?>
<h3 class="media-title"><?php
_e( 'Add media files from your computer'
); ?></h3>
<?php
media_upload_form( $errors ); ?>
<script type="text/javascript">
jQuery(function($){
var preloaded = $(".media-item.preloaded");
if ( preloaded.length > 0 ) {
preloaded.each(function(){prepareMediaItem({id:this.id.replace(/[^0-9]/g, '')},'');});
}
updateMediaForm();
});
</script>
<div id="media-items">