Changeset 22807
- Timestamp:
- 11/22/2012 03:43:16 AM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image-edit.php
r22749 r22807 712 712 if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) { 713 713 // Check if it's an image edit from attachment edit screen 714 if ( false !== strpos( wp_get_referer(), 'post.php' )) {714 if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) { 715 715 $thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true ); 716 716 $return->thumbnail = $thumb_url[0]; -
trunk/wp-admin/includes/media.php
r22783 r22807 2245 2245 $alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true ); 2246 2246 2247 $post_mime_types = get_post_mime_types();2248 $keys = array_keys( wp_match_mime_types( array_keys( $post_mime_types ), $post->post_mime_type ) );2249 $type = array_shift( $keys );2250 $type_html = "<input type='hidden' id='type-of-$attachment_id' value='" . esc_attr( $type ) . "' />";2251 2252 2247 $media_dims = ''; 2253 2248 $meta = wp_get_attachment_metadata( $post->ID ); … … 2295 2290 echo '<input type="hidden" name="' . esc_attr( $hidden_field ) . '" value="' . esc_attr( $value ) . '" />' . "\n"; 2296 2291 } 2292 echo '<input type="hidden" id="image-edit-context" value="edit-attachment" />' . "\n"; 2297 2293 } 2298 2294 -
trunk/wp-admin/js/image-edit.js
r22592 r22807 246 246 'history': history, 247 247 'target': target, 248 'context': $('#image-edit-context').length ? $('#image-edit-context').val() : null, 248 249 'do': 'save' 249 250 };
Note: See TracChangeset
for help on using the changeset viewer.