Media: Add support for applicable *-upload-ui hooks.

Supports pre-upload-ui, pre-plupload-upload-ui, post-plupload-upload-ui, post-upload-ui.

see #22186, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22557 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-11-13 01:50:08 +00:00
parent e0df0a74ca
commit 9fb6e29102
2 changed files with 18 additions and 3 deletions

View File

@ -756,6 +756,10 @@
right: 0;
}
.uploader-inline-content .upload-ui {
margin: 4em 0;
}
.uploader-inline h3 {
font-size: 20px;
font-weight: 200;

View File

@ -1398,9 +1398,20 @@ function wp_print_media_templates( $attachment ) {
<script type="text/html" id="tmpl-uploader-inline">
<div class="uploader-inline-content">
<h3><?php _e( 'Drop files anywhere to upload' ); ?></h3>
<a href="#" class="browser button button-hero"><?php _e( 'Select Files' ); ?></a>
<div class="media-progress-bar"><div></div></div>
<div class="pre-upload-ui">
<?php do_action( 'pre-upload-ui' ); ?>
<?php do_action( 'pre-plupload-upload-ui' ); ?>
</div>
<div class="upload-ui">
<h3><?php _e( 'Drop files anywhere to upload' ); ?></h3>
<a href="#" class="browser button button-hero"><?php _e( 'Select Files' ); ?></a>
</div>
<div class="post-upload-ui">
<?php do_action( 'post-plupload-upload-ui' ); ?>
<?php do_action( 'post-upload-ui' ); ?>
</div>
</div>
</script>