Changeset 23095 for trunk/wp-admin/includes/media.php
- Timestamp:
- 12/06/2012 05:52:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r23086 r23095 2271 2271 $post = get_post(); 2272 2272 2273 $open = isset( $_GET['image-editor'] ); 2274 if ( $open ) 2275 require_once ABSPATH . 'wp-admin/includes/image-edit.php'; 2276 2273 2277 $thumb_url = false; 2274 2278 if ( $attachment_id = intval( $post->ID ) ) 2275 $thumb_url = wp_get_attachment_image_src( $attachment_id, array( 900, 600 ), true );2279 $thumb_url = wp_get_attachment_image_src( $attachment_id, array( 900, 450 ), true ); 2276 2280 2277 2281 $filename = esc_html( basename( $post->guid ) ); 2278 2282 $title = esc_attr( $post->post_title ); 2279 2283 $alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true ); 2280 2281 $media_dims = '';2282 $meta = wp_get_attachment_metadata( $post->ID );2283 if ( is_array( $meta ) && array_key_exists( 'width', $meta ) && array_key_exists( 'height', $meta ) )2284 $media_dims .= "<span id='media-dims-$post->ID'>{$meta['width']} × {$meta['height']}</span> ";2285 $media_dims = apply_filters( 'media_meta', $media_dims, $post );2286 2284 2287 2285 $att_url = wp_get_attachment_url( $post->ID ); … … 2297 2295 <div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div> 2298 2296 2299 <div class="wp_attachment_image" id="media-head-<?php echo $attachment_id; ?>">2297 <div<?php if ( $open ) echo ' style="display:none"'; ?> class="wp_attachment_image" id="media-head-<?php echo $attachment_id; ?>"> 2300 2298 <p id="thumbnail-head-<?php echo $attachment_id; ?>"><img class="thumbnail" src="<?php echo set_url_scheme( $thumb_url[0] ); ?>" style="max-width:100%" alt="" /></p> 2301 2299 <p><?php echo $image_edit_button; ?></p> 2302 2300 </div> 2303 <div style="display:none" class="image-editor" id="image-editor-<?php echo $attachment_id; ?>"></div> 2301 <div<?php if ( ! $open ) echo ' style="display:none"'; ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>"> 2302 <?php if ( $open ) wp_image_editor( $attachment_id ); ?> 2303 </div> 2304 2304 </div> 2305 2305 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.