Changeset 12351 for trunk/wp-admin/includes/post.php
- Timestamp:
- 12/10/2009 06:14:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r12343 r12351 1063 1063 1064 1064 /** 1065 * Output HTML for the post imagemeta-box.1065 * Output HTML for the post thumbnail meta-box. 1066 1066 * 1067 1067 * @since 2.9.0 … … 1070 1070 * @return string html 1071 1071 */ 1072 function _wp_post_ image_html( $thumbnail_id = NULL ) {1072 function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { 1073 1073 global $content_width, $_wp_additional_image_sizes; 1074 $content = '<p class="hide-if-no-js"><a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . esc_html__( 'Set image' ) . '</a></p>';1074 $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>'; 1075 1075 1076 1076 if ( $thumbnail_id && get_post( $thumbnail_id ) ) { 1077 1077 $old_content_width = $content_width; 1078 1078 $content_width = 266; 1079 if ( !isset( $_wp_additional_image_sizes['post- image'] ) )1079 if ( !isset( $_wp_additional_image_sizes['post-thumbnail'] ) ) 1080 1080 $thumbnail_html = wp_get_attachment_image( $thumbnail_id, array( $content_width, $content_width ) ); 1081 1081 else 1082 $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post- image' );1082 $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' ); 1083 1083 if ( !empty( $thumbnail_html ) ) { 1084 1084 $content = '<a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>'; 1085 $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove image' ) . '</a></p>';1085 $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove thumbnail' ) . '</a></p>'; 1086 1086 } 1087 1087 $content_width = $old_content_width; 1088 1088 } 1089 1089 1090 return apply_filters( 'admin_post_ image_html', $content );1090 return apply_filters( 'admin_post_thumbnail_html', $content ); 1091 1091 } 1092 1092
Note: See TracChangeset
for help on using the changeset viewer.