diff --git wp-admin/includes/media.php wp-admin/includes/media.php
index 500a7ea..375d96b 100644
|
|
function edit_form_image_editor() { |
2285 | 2285 | $title = esc_attr( $post->post_title ); |
2286 | 2286 | $alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true ); |
2287 | 2287 | |
2288 | | $att_url = wp_get_attachment_url( $post->ID ); |
2289 | | |
| 2288 | $att_url = wp_get_attachment_url( $post->ID ); ?> |
| 2289 | <div class="wp_attachment_holder"> |
| 2290 | <?php |
2290 | 2291 | if ( wp_attachment_is_image( $post->ID ) ) : |
2291 | 2292 | $image_edit_button = ''; |
2292 | 2293 | if ( wp_image_editor_supports( array( 'mime_type' => $post->post_mime_type ) ) ) { |
… |
… |
function edit_form_image_editor() { |
2294 | 2295 | $image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <span class='spinner'></span>"; |
2295 | 2296 | } |
2296 | 2297 | ?> |
2297 | | <div class="wp_attachment_holder"> |
| 2298 | |
2298 | 2299 | <div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div> |
2299 | 2300 | |
2300 | 2301 | <div<?php if ( $open ) echo ' style="display:none"'; ?> class="wp_attachment_image" id="media-head-<?php echo $attachment_id; ?>"> |
… |
… |
function edit_form_image_editor() { |
2304 | 2305 | <div<?php if ( ! $open ) echo ' style="display:none"'; ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>"> |
2305 | 2306 | <?php if ( $open ) wp_image_editor( $attachment_id ); ?> |
2306 | 2307 | </div> |
2307 | | </div> |
2308 | | <?php endif; ?> |
| 2308 | <?php |
| 2309 | elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'audio/' ) ): |
| 2310 | |
| 2311 | echo do_shortcode( '[audio src="' . $att_url . '"]' ); |
| 2312 | |
| 2313 | elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'video/' ) ): |
2309 | 2314 | |
| 2315 | $meta = wp_get_attachment_metadata( $attachment_id ); |
| 2316 | $shortcode = sprintf( '[video src="%s"%s%s]', |
| 2317 | $att_url, |
| 2318 | empty( $meta['width'] ) ? '' : sprintf( ' width="%d"', $meta['width'] ), |
| 2319 | empty( $meta['height'] ) ? '' : sprintf( ' height="%d"', $meta['height'] ) |
| 2320 | ); |
| 2321 | echo do_shortcode( $shortcode ); |
| 2322 | |
| 2323 | endif; ?> |
| 2324 | </div> |
2310 | 2325 | <div class="wp_attachment_details edit-form-section"> |
2311 | 2326 | <p> |
2312 | 2327 | <label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br /> |