Changeset 12352
- Timestamp:
- 12/10/2009 07:04:01 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r12351 r12352 1240 1240 1241 1241 $thumbnail = ''; 1242 if ( 'image' == $type && isset($_GET['post_id']) && current_theme_supports( 'post-thumbnails', get_post_type($_GET['post_id']) ) && get_post_thumbnail_id($_GET['post_id']) != $attachment_id ) 1242 $calling_post_id = 0; 1243 if ( isset( $_GET['post_id'] ) ) 1244 $calling_post_id = $_GET['post_id']; 1245 elseif ( isset( $_POST ) && count( $_POST ) ) // Like for async-upload where $_GET['post_id'] isn't set 1246 $calling_post_id = $post->post_parent; 1247 if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) 1243 1248 $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>"; 1244 1249
Note: See TracChangeset
for help on using the changeset viewer.