Make WordPress Core

Changeset 12343


Ignore:
Timestamp:
12/08/2009 09:24:32 PM (15 years ago)
Author:
markjaquith
Message:

More standardization around Post/Page Image instead of Post/Page Thumbnail

Location:
trunk/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r12286 r12343  
    14111411    if ( $thumbnail_id == '-1' ) {
    14121412        delete_post_meta( $post_id, '_thumbnail_id' );
    1413         die( _wp_post_thumbnail_html() );
     1413        die( _wp_post_image_html() );
    14141414    }
    14151415
     
    14181418        if ( !empty( $thumbnail_html ) ) {
    14191419            update_post_meta( $post_id, '_thumbnail_id', $thumbnail_id );
    1420             die( _wp_post_thumbnail_html( $thumbnail_id ) );
     1420            die( _wp_post_image_html( $thumbnail_id ) );
    14211421        }
    14221422    }
  • trunk/wp-admin/edit-form-advanced.php

    r12339 r12343  
    100100add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core');
    101101if ( current_theme_supports( 'post-images' ) )
    102     add_meta_box('postimagediv', __('Post Thumbnail'), 'post_thumbnail_meta_box', 'post', 'side', 'low');
     102    add_meta_box('postimagediv', __('Post Image'), 'post_image_meta_box', 'post', 'side', 'low');
    103103add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'normal', 'core');
    104104add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', 'post', 'normal', 'core');
  • trunk/wp-admin/edit-page-form.php

    r12339 r12343  
    8282add_meta_box('slugdiv', __('Page Slug'), 'post_slug_meta_box', 'page', 'normal', 'core');
    8383if ( current_theme_supports( 'post-images' ) )
    84     add_meta_box('postimagediv', __('Page Thumbnail'), 'post_thumbnail_meta_box', 'page', 'side', 'low');
     84    add_meta_box('postimagediv', __('Page Image'), 'post_image_meta_box', 'page', 'side', 'low');
    8585
    8686$authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM
  • trunk/wp-admin/includes/meta-boxes.php

    r12330 r12343  
    816816
    817817/**
    818  * Display post thumbnail meta box.
     818 * Display post image meta box.
    819819 *
    820820 * @since 2.9.0
    821821 */
    822 function post_thumbnail_meta_box() {
     822function post_image_meta_box() {
    823823    global $post;
    824824    $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true );
    825     echo _wp_post_thumbnail_html( $thumbnail_id );
    826 }
     825    echo _wp_post_image_html( $thumbnail_id );
     826}
  • trunk/wp-admin/includes/post.php

    r12342 r12343  
    10631063
    10641064/**
    1065  * Output HTML for the post thumbnail meta-box.
     1065 * Output HTML for the post image meta-box.
    10661066 *
    10671067 * @since 2.9.0
     
    10701070 * @return string html
    10711071 */
    1072 function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
     1072function _wp_post_image_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 thumbnail' ) . '</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 image' ) . '</a></p>';
    10751075
    10761076    if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
     
    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 thumbnail' ) . '</a></p>';
     1085            $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove image' ) . '</a></p>';
    10861086        }
    10871087        $content_width = $old_content_width;
    10881088    }
    10891089
    1090     return apply_filters( 'admin_post_thumbnail_html', $content );
     1090    return apply_filters( 'admin_post_image_html', $content );
    10911091}
    10921092
Note: See TracChangeset for help on using the changeset viewer.