Changeset 12060 for trunk/wp-admin/includes/post.php
- Timestamp:
- 10/19/2009 08:23:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r12029 r12060 1027 1027 1028 1028 return $return; 1029 } 1030 1031 /** 1032 * Output HTML for the post thumbnail meta-box. 1033 * 1034 * @since 2.9.0 1035 * 1036 * @param int $thumbnail_id ID of the attachment used for thumbnail 1037 * @return string html 1038 */ 1039 function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { 1040 $content = '<p class="hide-if-no-js"><a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . esc_html__( 'Set thumbnail' ) . '</a></p>'; 1041 1042 if ( $thumbnail_id && get_post( $thumbnail_id ) ) { 1043 $thumbnail_html = wp_get_attachment_image($thumbnail_id, array( 266, 266 ) ); 1044 if ( !empty( $thumbnail_html ) ) { 1045 $content = '<a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>'; 1046 $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove thumbnail' ) . '</a></p>'; 1047 } 1048 } 1049 1050 return apply_filters( 'admin_post_thumbnail_html', $content ); 1029 1051 } 1030 1052
Note: See TracChangeset
for help on using the changeset viewer.