Changeset 19902 for trunk/wp-admin/includes/post.php
- Timestamp:
- 02/10/2012 05:41:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r19853 r19902 1144 1144 * 1145 1145 * @param int $thumbnail_id ID of the attachment used for thumbnail 1146 * @param int $post_id ID of the post associated with the thumbnail, defaults to global $post_ID 1146 1147 * @return string html 1147 1148 */ 1148 function _wp_post_thumbnail_html( $thumbnail_id = null ) {1149 function _wp_post_thumbnail_html( $thumbnail_id = null, $post_id = null ) { 1149 1150 global $content_width, $_wp_additional_image_sizes, $post_ID; 1151 1152 if ( empty( $post_id ) ) 1153 $post_id = $post_ID; 1154 1150 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>'; 1151 1156 $content = sprintf($set_thumbnail_link, esc_html__( 'Set featured image' )); … … 1159 1164 $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' ); 1160 1165 if ( !empty( $thumbnail_html ) ) { 1161 $ajax_nonce = wp_create_nonce( "set_post_thumbnail-$post_ ID" );1166 $ajax_nonce = wp_create_nonce( "set_post_thumbnail-$post_id" ); 1162 1167 $content = sprintf($set_thumbnail_link, $thumbnail_html); 1163 1168 $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail(\'' . $ajax_nonce . '\');return false;">' . esc_html__( 'Remove featured image' ) . '</a></p>';
Note: See TracChangeset
for help on using the changeset viewer.