Changeset 12036 for trunk/wp-admin/includes/media.php
- Timestamp:
- 10/15/2009 12:57:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r12018 r12036 116 116 117 117 function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { 118 $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>'; 119 118 120 if ( $thumbnail_id && get_post( $thumbnail_id ) ) { 119 121 $thumbnail_html = wp_get_attachment_image($thumbnail_id, array( 266, 266 ) ); 120 if ( !empty( $thumbnail_html ) ) 121 return apply_filters( 'admin_post_thumbnail_html', '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>' ); 122 } 123 return apply_filters( 'admin_post_thumbnail_html', '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . esc_html__( 'Set thumbnail' ) . '</a>' ); 122 if ( !empty( $thumbnail_html ) ) { 123 $content = '<a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>'; 124 $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove thumbnail' ) . '</a></p>'; 125 } 126 } 127 128 return apply_filters( 'admin_post_thumbnail_html', $content ); 124 129 } 125 130
Note: See TracChangeset
for help on using the changeset viewer.