Ticket #20003: 20003-patch.diff
File 20003-patch.diff, 1.7 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/post.php
1152 1152 if ( empty( $post_id ) ) 1153 1153 $post_id = $post_ID; 1154 1154 1155 $set_thumbnail_link = '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set featured image' ) . '" href="' . esc_url( get_upload_iframe_src('image' ) ) . '" id="set-post-thumbnail" class="thickbox">%s</a></p>';1155 $set_thumbnail_link = '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set featured image' ) . '" href="' . esc_url( get_upload_iframe_src('image', $post_id) ) . '" id="set-post-thumbnail" class="thickbox">%s</a></p>'; 1156 1156 $content = sprintf($set_thumbnail_link, esc_html__( 'Set featured image' )); 1157 1157 1158 1158 if ( $thumbnail_id && get_post( $thumbnail_id ) ) { -
wp-admin/includes/media.php
386 386 return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='{$id}-add_{$type}' class='thickbox add_$type' title='" . esc_attr( $title ) . "'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>"; 387 387 } 388 388 389 function get_upload_iframe_src( $type = null ) {389 function get_upload_iframe_src( $type = null, $post_id = null ) { 390 390 global $post_ID; 391 391 392 $uploading_iframe_ID = (int) $post_ID; 392 if ( empty( $post_id ) ) 393 $post_id = $post_ID; 394 395 $uploading_iframe_ID = (int) $post_id; 393 396 $upload_iframe_src = add_query_arg( 'post_id', $uploading_iframe_ID, admin_url('media-upload.php') ); 394 397 395 398 if ( $type && 'media' != $type )