Make WordPress Core


Ignore:
Timestamp:
12/10/2009 06:14:36 AM (14 years ago)
Author:
markjaquith
Message:

Post/Page Image was too generic a name. Post/Page Thumbnail is more clear, even if you can create very large thumbnail images if you so choose.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r12343 r12351  
    10631063
    10641064/**
    1065  * Output HTML for the post image meta-box.
     1065 * Output HTML for the post thumbnail meta-box.
    10661066 *
    10671067 * @since 2.9.0
     
    10701070 * @return string html
    10711071 */
    1072 function _wp_post_image_html( $thumbnail_id = NULL ) {
     1072function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
    10731073    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>';
    10751075
    10761076    if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
    10771077        $old_content_width = $content_width;
    10781078        $content_width = 266;
    1079         if ( !isset( $_wp_additional_image_sizes['post-image'] ) )
     1079        if ( !isset( $_wp_additional_image_sizes['post-thumbnail'] ) )
    10801080            $thumbnail_html = wp_get_attachment_image( $thumbnail_id, array( $content_width, $content_width ) );
    10811081        else
    1082             $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-image' );
     1082            $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' );
    10831083        if ( !empty( $thumbnail_html ) ) {
    10841084            $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>';
    10861086        }
    10871087        $content_width = $old_content_width;
    10881088    }
    10891089
    1090     return apply_filters( 'admin_post_image_html', $content );
     1090    return apply_filters( 'admin_post_thumbnail_html', $content );
    10911091}
    10921092
Note: See TracChangeset for help on using the changeset viewer.