Ticket #18708: 18708.3.patch
File 18708.3.patch, 2.2 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/media.php
390 390 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>"; 391 391 } 392 392 393 function get_upload_iframe_src( $type = null, $post_id = null, $tab = null ) {393 function get_upload_iframe_src( $type = null, $post_id = null, $tab = null, $context = 'post' ) { 394 394 global $post_ID; 395 395 396 396 if ( empty( $post_id ) ) … … 404 404 if ( ! empty( $tab ) ) 405 405 $upload_iframe_src = add_query_arg('tab', $tab, $upload_iframe_src); 406 406 407 if ( 'post' != $context ) 408 $upload_iframe_src = add_query_arg('context', $context, $upload_iframe_src); 409 407 410 $upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src); 408 411 409 412 return add_query_arg('TB_iframe', true, $upload_iframe_src); -
wp-admin/includes/post.php
1145 1145 if ( empty( $post_id ) ) 1146 1146 $post_id = $post_ID; 1147 1147 1148 $upload_iframe_src = esc_url( get_upload_iframe_src( 'image', $post_id) );1148 $upload_iframe_src = esc_url( get_upload_iframe_src( 'image', $post_id, null, 'featured' ) ); 1149 1149 $set_thumbnail_link = '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set featured image' ) . '" href="%s" id="set-post-thumbnail" class="thickbox">%s</a></p>'; 1150 1150 $content = sprintf( $set_thumbnail_link, $upload_iframe_src, esc_html__( 'Set featured image' ) ); 1151 1151 -
wp-admin/js/set-post-thumbnail.dev.js
15 15 $link.fadeOut( 2000 ); 16 16 win.WPSetThumbnailID(id); 17 17 win.WPSetThumbnailHTML(str); 18 if ( window.location.href.indexOf('featured') != -1 ) 19 win.tb_remove(); 18 20 } 19 21 } 20 22 );