diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0ae2f100ed..a30076996b 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -392,10 +392,13 @@ function _media_button($title, $icon, $type, $id) { return "$title"; } -function get_upload_iframe_src( $type = null ) { +function get_upload_iframe_src( $type = null, $post_id = null ) { global $post_ID; - $uploading_iframe_ID = (int) $post_ID; + if ( empty( $post_id ) ) + $post_id = $post_ID; + + $uploading_iframe_ID = (int) $post_id; $upload_iframe_src = add_query_arg( 'post_id', $uploading_iframe_ID, admin_url('media-upload.php') ); if ( $type && 'media' != $type ) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 252b056e9a..d2f26a6cfd 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1152,7 +1152,7 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post_id = null ) { if ( empty( $post_id ) ) $post_id = $post_ID; - $set_thumbnail_link = '

%s

'; + $set_thumbnail_link = '

%s

'; $content = sprintf($set_thumbnail_link, esc_html__( 'Set featured image' )); if ( $thumbnail_id && get_post( $thumbnail_id ) ) {