Skip to content

Commit

Permalink
Standardize around "post image" instead of "post thumbnail"
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@12339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
markjaquith committed Dec 8, 2009
1 parent 2bfe9c5 commit 0415ab7
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions wp-admin/edit-form-advanced.php
Expand Up @@ -98,8 +98,8 @@
}

add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core');
if ( current_theme_supports( 'post-thumbnails' ) )
add_meta_box('postthumbnaildiv', __('Post Thumbnail'), 'post_thumbnail_meta_box', 'post', 'side', 'low');
if ( current_theme_supports( 'post-images' ) )
add_meta_box('postimagediv', __('Post Thumbnail'), 'post_thumbnail_meta_box', 'post', 'side', 'low');
add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'normal', 'core');
add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', 'post', 'normal', 'core');
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'post', 'normal', 'core');
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/edit-page-form.php
Expand Up @@ -80,8 +80,8 @@
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 'page', 'normal', 'core');
add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 'page', 'normal', 'core');
add_meta_box('slugdiv', __('Page Slug'), 'post_slug_meta_box', 'page', 'normal', 'core');
if ( current_theme_supports( 'post-thumbnails' ) )
add_meta_box('postthumbnaildiv', __('Page Thumbnail'), 'post_thumbnail_meta_box', 'page', 'side', 'low');
if ( current_theme_supports( 'post-images' ) )
add_meta_box('postimagediv', __('Page Thumbnail'), 'post_thumbnail_meta_box', 'page', 'side', 'low');

$authors = get_editable_user_ids( $current_user->id, true, 'page' ); // TODO: ROLE SYSTEM
if ( $post->post_author && !in_array($post->post_author, $authors) )
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/includes/media.php
Expand Up @@ -1239,7 +1239,7 @@ function get_media_item( $attachment_id, $args = null ) {
}

$thumbnail = '';
if ( 'image' == $type && current_theme_supports( 'post-thumbnails' ) && get_post_image_id($_GET['post_id']) != $attachment_id )
if ( 'image' == $type && current_theme_supports( 'post-images' ) && 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 thumbnail" ) . "</a>";

if ( ( $send || $thumbnail || $delete ) && !isset($form_fields['buttons']) )
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/js/post.dev.js
Expand Up @@ -202,7 +202,7 @@ commentsBox = {
};

WPSetThumbnailHTML = function(html){
$('.inside', '#postthumbnaildiv').html(html);
$('.inside', '#postimagediv').html(html);
};

WPSetThumbnailID = function(id){
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/js/post.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wp-includes/post-image-template.php
Expand Up @@ -2,8 +2,8 @@
/**
* WordPress Post Image Template Functions.
*
* Support for post thumbnails
* Themes function.php must call add_theme_support( 'post-thumbnails' ) to use these.
* Support for post images
* Themes function.php must call add_theme_support( 'post-images' ) to use these.
*
* @package WordPress
* @subpackage Template
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/script-loader.php
Expand Up @@ -275,7 +275,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20091012' );
$scripts->add_data( 'postbox', 'group', 1 );

$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20091202' );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20091208' );
$scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'),
Expand Down
2 changes: 2 additions & 0 deletions wp-includes/theme.php
Expand Up @@ -1320,6 +1320,8 @@ function add_custom_image_header($header_callback, $admin_header_callback) {
*/
function add_theme_support( $feature ) {
global $_wp_theme_features;
if ( 'post-thumbnails' == $feature ) // This was changed during 2.9 beta. I'll be nice and not break things.
$feature = 'post-images';
$_wp_theme_features[$feature] = true;
}

Expand Down
2 changes: 1 addition & 1 deletion wp-settings.php
Expand Up @@ -692,7 +692,7 @@ function wp_clone( $object ) {
include(TEMPLATEPATH . '/functions.php');

// Load in support for template functions which the theme supports
require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-image-template.php' );
require_if_theme_supports( 'post-images', ABSPATH . WPINC . '/post-image-template.php' );

/**
* Runs just before PHP shuts down execution.
Expand Down

0 comments on commit 0415ab7

Please sign in to comment.