<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12351] trunk: Post/Page Image was too generic a name.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12351">12351</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2009-12-10 06:14:36 +0000 (Thu, 10 Dec 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>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.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadmineditformadvancedphp">trunk/wp-admin/edit-form-advanced.php</a></li>
<li><a href="#trunkwpadmineditpageformphp">trunk/wp-admin/edit-page-form.php</a></li>
<li><a href="#trunkwpadminincludesimagephp">trunk/wp-admin/includes/image.php</a></li>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminincludesmetaboxesphp">trunk/wp-admin/includes/meta-boxes.php</a></li>
<li><a href="#trunkwpadminincludespostphp">trunk/wp-admin/includes/post.php</a></li>
<li><a href="#trunkwpincludesdefaultfiltersphp">trunk/wp-includes/default-filters.php</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
<li><a href="#trunkwpincludesthemephp">trunk/wp-includes/theme.php</a></li>
<li><a href="#trunkwpsettingsphp">trunk/wp-settings.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpincludespostthumbnailtemplatephp">trunk/wp-includes/post-thumbnail-template.php</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpincludespostimagetemplatephp">trunk/wp-includes/post-image-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-admin/admin-ajax.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -1410,14 +1410,14 @@
</span><span class="cx">
</span><span class="cx">         if ( $thumbnail_id == '-1' ) {
</span><span class="cx">                 delete_post_meta( $post_id, '_thumbnail_id' );
</span><del>-                die( _wp_post_image_html() );
</del><ins>+                die( _wp_post_thumbnail_html() );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
</span><span class="cx">                 $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' );
</span><span class="cx">                 if ( !empty( $thumbnail_html ) ) {
</span><span class="cx">                         update_post_meta( $post_id, '_thumbnail_id', $thumbnail_id );
</span><del>-                        die( _wp_post_image_html( $thumbnail_id ) );
</del><ins>+                        die( _wp_post_thumbnail_html( $thumbnail_id ) );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         die( '0' );
</span></span></pre></div>
<a id="trunkwpadmineditformadvancedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-form-advanced.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-form-advanced.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-admin/edit-form-advanced.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -98,8 +98,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core');
</span><del>-if ( current_theme_supports( 'post-images', 'post' ) )
-        add_meta_box('postimagediv', __('Post Image'), 'post_image_meta_box', 'post', 'side', 'low');
</del><ins>+if ( current_theme_supports( 'post-thumbnails', 'post' ) )
+        add_meta_box('postimagediv', __('Post Thumbnail'), 'post_thumbnail_meta_box', 'post', 'side', 'low');
</ins><span class="cx"> add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'normal', 'core');
</span><span class="cx"> add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', 'post', 'normal', 'core');
</span><span class="cx"> add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'normal', 'core');
</span></span></pre></div>
<a id="trunkwpadmineditpageformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-page-form.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-page-form.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-admin/edit-page-form.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -80,8 +80,8 @@
</span><span class="cx"> add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'page', 'normal', 'core');
</span><span class="cx"> add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'page', 'normal', 'core');
</span><span class="cx"> add_meta_box('slugdiv', __('Page Slug'), 'post_slug_meta_box', 'page', 'normal', 'core');
</span><del>-if ( current_theme_supports( 'post-images', 'page' ) )
-        add_meta_box('postimagediv', __('Page Image'), 'post_image_meta_box', 'page', 'side', 'low');
</del><ins>+if ( current_theme_supports( 'post-thumbnails', 'page' ) )
+        add_meta_box('postimagediv', __('Page Image'), 'post_thumbnail_meta_box', 'page', 'side', 'low');
</ins><span class="cx">
</span><span class="cx"> $authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM
</span><span class="cx"> if ( $post->post_author && !in_array($post->post_author, $authors) )
</span></span></pre></div>
<a id="trunkwpadminincludesimagephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/image.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/image.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-admin/includes/image.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Generate post image attachment meta data.
</del><ins>+ * Generate post thumbnail attachment meta data.
</ins><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> *
</span></span></pre></div>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-admin/includes/media.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -1239,8 +1239,8 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $thumbnail = '';
</span><del>-        if ( 'image' == $type && isset($_GET['post_id']) && current_theme_supports( 'post-images', get_post_type($_GET['post_id']) ) && get_post_image_id($_GET['post_id']) != $attachment_id )
-                $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as post image" ) . "</a>";
</del><ins>+        if ( 'image' == $type && isset($_GET['post_id']) && current_theme_supports( 'post-thumbnails', get_post_type($_GET['post_id']) ) && get_post_thumbnail_id($_GET['post_id']) != $attachment_id )
+                $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>";
</ins><span class="cx">
</span><span class="cx">         if ( ( $send || $thumbnail || $delete ) && !isset($form_fields['buttons']) )
</span><span class="cx">                 $form_fields['buttons'] = array('tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>$send $thumbnail $delete</td></tr>\n");
</span></span></pre></div>
<a id="trunkwpadminincludesmetaboxesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/meta-boxes.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/meta-boxes.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-admin/includes/meta-boxes.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -815,12 +815,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Display post image meta box.
</del><ins>+ * Display post thumbnail meta box.
</ins><span class="cx"> *
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> */
</span><del>-function post_image_meta_box() {
</del><ins>+function post_thumbnail_meta_box() {
</ins><span class="cx">         global $post;
</span><span class="cx">         $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true );
</span><del>-        echo _wp_post_image_html( $thumbnail_id );
</del><ins>+        echo _wp_post_thumbnail_html( $thumbnail_id );
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/post.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-admin/includes/post.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -1062,32 +1062,32 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Output HTML for the post image meta-box.
</del><ins>+ * Output HTML for the post thumbnail meta-box.
</ins><span class="cx"> *
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> *
</span><span class="cx"> * @param int $thumbnail_id ID of the attachment used for thumbnail
</span><span class="cx"> * @return string html
</span><span class="cx"> */
</span><del>-function _wp_post_image_html( $thumbnail_id = NULL ) {
</del><ins>+function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
</ins><span class="cx">         global $content_width, $_wp_additional_image_sizes;
</span><del>-        $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>';
</del><ins>+        $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>';
</ins><span class="cx">
</span><span class="cx">         if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
</span><span class="cx">                 $old_content_width = $content_width;
</span><span class="cx">                 $content_width = 266;
</span><del>-                if ( !isset( $_wp_additional_image_sizes['post-image'] ) )
</del><ins>+                if ( !isset( $_wp_additional_image_sizes['post-thumbnail'] ) )
</ins><span class="cx">                         $thumbnail_html = wp_get_attachment_image( $thumbnail_id, array( $content_width, $content_width ) );
</span><span class="cx">                 else
</span><del>-                        $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-image' );
</del><ins>+                        $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' );
</ins><span class="cx">                 if ( !empty( $thumbnail_html ) ) {
</span><span class="cx">                         $content = '<a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>';
</span><del>-                        $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove image' ) . '</a></p>';
</del><ins>+                        $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove thumbnail' ) . '</a></p>';
</ins><span class="cx">                 }
</span><span class="cx">                 $content_width = $old_content_width;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        return apply_filters( 'admin_post_image_html', $content );
</del><ins>+        return apply_filters( 'admin_post_thumbnail_html', $content );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-filters.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-filters.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-includes/default-filters.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -213,9 +213,9 @@
</span><span class="cx"> add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
</span><span class="cx"> add_action( 'wp_scheduled_delete', 'wp_scheduled_delete' );
</span><span class="cx">
</span><del>-// Post Image CSS class filtering
-add_action( 'begin_fetch_post_image_html', '_wp_post_image_class_filter_add' );
-add_action( 'end_fetch_post_image_html', '_wp_post_image_class_filter_remove' );
</del><ins>+// Post Thumbnail CSS class filtering
+add_action( 'begin_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_add' );
+add_action( 'end_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_remove' );
</ins><span class="cx">
</span><span class="cx"> // Redirect Old Slugs
</span><span class="cx"> add_action( 'template_redirect', 'wp_old_slug_redirect' );
</span></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-includes/media.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -183,10 +183,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Registers an image size for the post image
</del><ins>+ * Registers an image size for the post thumbnail
</ins><span class="cx"> */
</span><del>-function set_post_image_size( $width = 0, $height = 0, $crop = FALSE ) {
-        add_image_size( 'post-image', $width, $height, $crop );
</del><ins>+function set_post_thumbnail_size( $width = 0, $height = 0, $crop = FALSE ) {
+        add_image_size( 'post-thumbnail', $width, $height, $crop );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><span class="lines">@@ -578,38 +578,38 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Adds a 'wp-post-image' class to post image thumbnails
- * Uses the begin_fetch_post_image_html and end_fetch_post_image_html action hooks to
- * dynamically add/remove itself so as to only filter post image thumbnails
</del><ins>+ * Adds a 'wp-post-image' class to post thumbnail thumbnails
+ * Uses the begin_fetch_post_thumbnail_html and end_fetch_post_thumbnail_html action hooks to
+ * dynamically add/remove itself so as to only filter post thumbnail thumbnails
</ins><span class="cx"> *
</span><span class="cx"> * @author Mark Jaquith
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> * @param array $attr Attributes including src, class, alt, title
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>-function _wp_post_image_class_filter( $attr ) {
</del><ins>+function _wp_post_thumbnail_class_filter( $attr ) {
</ins><span class="cx">         $attr['class'] .= ' wp-post-image';
</span><span class="cx">         return $attr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Adds _wp_post_image_class_filter to the wp_get_attachment_image_attributes filter
</del><ins>+ * Adds _wp_post_thumbnail_class_filter to the wp_get_attachment_image_attributes filter
</ins><span class="cx"> *
</span><span class="cx"> * @author Mark Jaquith
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> */
</span><del>-function _wp_post_image_class_filter_add( $attr ) {
-        add_filter( 'wp_get_attachment_image_attributes', '_wp_post_image_class_filter' );
</del><ins>+function _wp_post_thumbnail_class_filter_add( $attr ) {
+        add_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Removes _wp_post_image_class_filter from the wp_get_attachment_image_attributes filter
</del><ins>+ * Removes _wp_post_thumbnail_class_filter from the wp_get_attachment_image_attributes filter
</ins><span class="cx"> *
</span><span class="cx"> * @author Mark Jaquith
</span><span class="cx"> * @since 2.9.0
</span><span class="cx"> */
</span><del>-function _wp_post_image_class_filter_remove( $attr ) {
-        remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_image_class_filter' );
</del><ins>+function _wp_post_thumbnail_class_filter_remove( $attr ) {
+        remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> add_shortcode('wp_caption', 'img_caption_shortcode');
</span></span></pre></div>
<a id="trunkwpincludespostimagetemplatephp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/post-image-template.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-image-template.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-includes/post-image-template.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -1,76 +0,0 @@
</span><del>-<?php
-/**
- * WordPress Post Image Template Functions.
- *
- * Support for post images
- * Themes function.php must call add_theme_support( 'post-images' ) to use these.
- *
- * @package WordPress
- * @subpackage Template
- */
-
-/**
- * Check if post has an image attached.
- *
- * @since 2.9.0
- *
- * @param int $post_id Optional. Post ID.
- * @return bool Whether post has an image attached (true) or not (false).
- */
-function has_post_image( $post_id = NULL ) {
-        global $id;
-        $post_id = ( NULL === $post_id ) ? $id : $post_id;
-        return !! get_post_image_id( $post_id );
-}
-
-/**
- * Retrieve Post Image ID.
- *
- * @since 2.9.0
- *
- * @param int $post_id Optional. Post ID.
- * @return int
- */
-function get_post_image_id( $post_id = NULL ) {
-        global $id;
-        $post_id = ( NULL === $post_id ) ? $id : $post_id;
-        return get_post_meta( $post_id, '_thumbnail_id', true );
-}
-
-/**
- * Display Post Image.
- *
- * @since 2.9.0
- *
- * @param int $size Optional. Image size. Defaults to 'post-image', which theme sets using set_post_image_size( $width, $height, $crop_flag );.
- * @param string|array $attr Optional. Query string or array of attributes.
- */
-function the_post_image( $size = 'post-image', $attr = '' ) {
-        echo get_the_post_image( NULL, $size, $attr );
-}
-
-/**
- * Retrieve Post Image.
- *
- * @since 2.9.0
- *
- * @param int $post_id Optional. Post ID.
- * @param string $size Optional. Image size. Defaults to 'thumbnail'.
- * @param string|array $attr Optional. Query string or array of attributes.
- */
-function get_the_post_image( $post_id = NULL, $size = 'post-image', $attr = '' ) {
-        global $id;
-        $post_id = ( NULL === $post_id ) ? $id : $post_id;
-        $post_image_id = get_post_image_id( $post_id );
-        $size = apply_filters( 'post_image_size', $size );
-        if ( $post_image_id ) {
-                do_action( 'begin_fetch_post_image_html', $post_id, $post_image_id, $size ); // for "Just In Time" filtering of all of wp_get_attachment_image()'s filters
-                $html = wp_get_attachment_image( $post_image_id, $size, false, $attr );
-                do_action( 'end_fetch_post_image_html', $post_id, $post_image_id, $size );
-        } else {
-                $html = '';
-        }
-        return apply_filters( 'post_image_html', $html, $post_id, $post_image_id, $size, $attr );
-}
-
-?>
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludespostthumbnailtemplatephp"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/post-thumbnail-template.php (0 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-thumbnail-template.php         (rev 0)
+++ trunk/wp-includes/post-thumbnail-template.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+<?php
+/**
+ * WordPress Post Thumbnail Template Functions.
+ *
+ * Support for post thumbnails
+ * Themes function.php must call add_theme_support( 'post-thumbnails' ) to use these.
+ *
+ * @package WordPress
+ * @subpackage Template
+ */
+
+/**
+ * Check if post has an image attached.
+ *
+ * @since 2.9.0
+ *
+ * @param int $post_id Optional. Post ID.
+ * @return bool Whether post has an image attached (true) or not (false).
+ */
+function has_post_thumbnail( $post_id = NULL ) {
+        global $id;
+        $post_id = ( NULL === $post_id ) ? $id : $popost-thumbnailst_id;
+        return !! get_post_thumbnail_id( $post_id );
+}
+
+/**
+ * Retrieve Post Thumbnail ID.
+ *
+ * @since 2.9.0
+ *
+ * @param int $post_id Optional. Post ID.
+ * @return int
+ */
+function get_post_thumbnail_id( $post_id = NULL ) {
+        global $id;
+        $post_id = ( NULL === $post_id ) ? $id : $post_id;
+        return get_post_meta( $post_id, '_thumbnail_id', true );
+}
+
+/**
+ * Display Post Thumbnail.
+ *
+ * @since 2.9.0
+ *
+ * @param int $size Optional. Image size. Defaults to 'post-thumbnail', which theme sets using set_post_thumbnail_size( $width, $height, $crop_flag );.
+ * @param string|array $attr Optional. Query string or array of attributes.
+ */
+function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {
+        echo get_the_post_thumbnail( NULL, $size, $attr );
+}
+
+/**
+ * Retrieve Post Thumbnail.
+ *
+ * @since 2.9.0
+ *
+ * @param int $post_id Optional. Post ID.
+ * @param string $size Optional. Image size. Defaults to 'thumbnail'.
+ * @param string|array $attr Optional. Query string or array of attributes.
+ */
+function get_the_post_thumbnail( $post_id = NULL, $size = 'post-thumbnail', $attr = '' ) {
+        global $id;
+        $post_id = ( NULL === $post_id ) ? $id : $post_id;
+        $post_thumbnail_id = get_post_thumbnail_id( $post_id );
+        $size = apply_filters( 'post_thumbnail_size', $size );
+        if ( $post_thumbnail_id ) {
+                do_action( 'begin_fetch_post_thumbnail_html', $post_id, $post_thumbnail_id, $size ); // for "Just In Time" filtering of all of wp_get_attachment_image()'s filters
+                $html = wp_get_attachment_image( $post_thumbnail_id, $size, false, $attr );
+                do_action( 'end_fetch_post_thumbnail_html', $post_id, $post_thumbnail_id, $size );
+        } else {
+                $html = '';
+        }
+        return apply_filters( 'post_thumbnail_html', $html, $post_id, $post_thumbnail_id, $size, $attr );
+}
+
+?>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-includes/script-loader.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -385,7 +385,7 @@
</span><span class="cx">                 $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), '20091021' );
</span><span class="cx">                 $scripts->add_data( 'set-post-thumbnail', 'group', 1 );
</span><span class="cx">                 $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array(
</span><del>-                        'setThumbnail' => __( 'Use as post image' ),
</del><ins>+                        'setThumbnail' => __( 'Use as thumbnail' ),
</ins><span class="cx">                         'saving' => __( 'Saving...' ),
</span><span class="cx">                         'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' )
</span><span class="cx">                 ) );
</span></span></pre></div>
<a id="trunkwpincludesthemephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/theme.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/theme.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-includes/theme.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -1321,9 +1321,6 @@
</span><span class="cx"> function add_theme_support( $feature ) {
</span><span class="cx">         global $_wp_theme_features;
</span><span class="cx">
</span><del>-        if ( 'post-thumbnails' == $feature ) // This was changed during 2.9 beta. I'll be nice and not break things.
-                $feature = 'post-images';
-
</del><span class="cx">         if ( func_num_args() == 1 )
</span><span class="cx">                 $_wp_theme_features[$feature] = true;
</span><span class="cx">         else
</span><span class="lines">@@ -1353,7 +1350,7 @@
</span><span class="cx">
</span><span class="cx">         // @todo Allow pluggable arg checking
</span><span class="cx">         switch ( $feature ) {
</span><del>-                case 'post-images':
</del><ins>+                case 'post-thumbnails':
</ins><span class="cx">                         // post-thumbnails can be registered for only certain content/post types by passing
</span><span class="cx">                         // an array of types to add_theme_support(). If no array was passed, then
</span><span class="cx">                         // any type is accepted
</span></span></pre></div>
<a id="trunkwpsettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-settings.php (12350 => 12351)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-settings.php        2009-12-09 15:39:20 UTC (rev 12350)
+++ trunk/wp-settings.php        2009-12-10 06:14:36 UTC (rev 12351)
</span><span class="lines">@@ -692,7 +692,7 @@
</span><span class="cx">         include(TEMPLATEPATH . '/functions.php');
</span><span class="cx">
</span><span class="cx"> // Load in support for template functions which the theme supports
</span><del>-require_if_theme_supports( 'post-images', ABSPATH . WPINC . '/post-image-template.php' );
</del><ins>+require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' );
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Runs just before PHP shuts down execution.
</span></span></pre>
</div>
</div>
</body>
</html>