Wordpress 3.6
[autoinstalls/wordpress.git] / wp-includes / media-template.php
index d4840903de9fcc8b8c1bea00b7227a2c51c57202..6af7dc5f324448414456a2ef63854efda378fb7c 100644 (file)
@@ -48,7 +48,7 @@ function wp_print_media_templates() {
                        <h3 class="upload-message">{{ data.message }}</h3>
                <# } #>
                <?php if ( ! _device_can_upload() ) : ?>
-                       <h3 class="upload-instructions"><?php _e('The web browser on your device cannot be used to upload files. You may be able to use the <a href="http://wordpress.org/extend/mobile/">native app for your device</a> instead.'); ?></h3>
+                       <h3 class="upload-instructions"><?php printf( __('The web browser on your device cannot be used to upload files. You may be able to use the <a href="%s">native app for your device</a> instead.'), 'http://wordpress.org/mobile/' ); ?></h3>
                <?php elseif ( is_multisite() && ! is_upload_space_available() ) : ?>
                        <h3 class="upload-instructions"><?php _e( 'Upload Limit Exceeded' ); ?></h3>
                        <?php do_action( 'upload_ui_over_quota' ); ?>
@@ -205,6 +205,10 @@ function wp_print_media_templates() {
                                        <# } #>
                                <# } #>
 
+                               <# if ( data.fileLength ) { #>
+                                       <div class="file-length"><?php _e( 'Length:' ); ?> {{ data.fileLength }}</div>
+                               <# } #>
+
                                <# if ( ! data.uploading && data.can.remove ) { #>
                                        <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
                                <# } #>
@@ -281,25 +285,47 @@ function wp_print_media_templates() {
 
                <div class="setting">
                        <label>
-                               <span><?php _e('Link To'); ?></span>
+                               <# if ( data.model.canEmbed ) { #>
+                                       <span><?php _e('Embed or Link'); ?></span>
+                               <# } else { #>
+                                       <span><?php _e('Link To'); ?></span>
+                               <# } #>
+
                                <select class="link-to"
                                        data-setting="link"
-                                       <# if ( data.userSettings ) { #>
+                                       <# if ( data.userSettings && ! data.model.canEmbed ) { #>
                                                data-user-setting="urlbutton"
                                        <# } #>>
 
-                                       <option value="custom">
-                                               <?php esc_attr_e('Custom URL'); ?>
+                               <# if ( data.model.canEmbed ) { #>
+                                       <option value="embed" selected>
+                                               <?php esc_attr_e('Embed Media Player'); ?>
                                        </option>
+                                       <option value="file">
+                               <# } else { #>
                                        <option value="file" selected>
+                               <# } #>
+                                       <# if ( data.model.canEmbed ) { #>
+                                               <?php esc_attr_e('Link to Media File'); ?>
+                                       <# } else { #>
                                                <?php esc_attr_e('Media File'); ?>
+                                       <# } #>
                                        </option>
                                        <option value="post">
+                                       <# if ( data.model.canEmbed ) { #>
+                                               <?php esc_attr_e('Link to Attachment Page'); ?>
+                                       <# } else { #>
                                                <?php esc_attr_e('Attachment Page'); ?>
+                                       <# } #>
+                                       </option>
+                               <# if ( 'image' === data.type ) { #>
+                                       <option value="custom">
+                                               <?php esc_attr_e('Custom URL'); ?>
                                        </option>
                                        <option value="none">
                                                <?php esc_attr_e('None'); ?>
                                        </option>
+                               <# } #>
                                </select>
                        </label>
                        <input type="text" class="link-to-custom" data-setting="linkUrl" />
@@ -353,6 +379,9 @@ function wp_print_media_templates() {
                                <option value="file">
                                        <?php esc_attr_e('Media File'); ?>
                                </option>
+                               <option value="none">
+                                       <?php esc_attr_e('None'); ?>
+                               </option>
                        </select>
                </label>