Change UI labels from "Post Thumbnails" to "Featured Image". See #12554

git-svn-id: http://svn.automattic.com/wordpress/trunk@13940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-04-02 06:12:49 +00:00
parent 0025a953ac
commit ee058cca62
4 changed files with 5 additions and 5 deletions

View File

@ -113,7 +113,7 @@ if ( post_type_supports($post_type, 'page-attributes') )
add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core'); add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core');
if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports($post_type, 'thumbnail') ) if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports($post_type, 'thumbnail') )
add_meta_box('postimagediv', sprintf( __('%s Thumbnail'), $post_type_object->singular_label ), 'post_thumbnail_meta_box', $post_type, 'side', 'low'); add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', $post_type, 'side', 'low');
if ( post_type_supports($post_type, 'excerpt') ) if ( post_type_supports($post_type, 'excerpt') )
add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $post_type, 'normal', 'core'); add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $post_type, 'normal', 'core');

View File

@ -1282,7 +1282,7 @@ function get_media_item( $attachment_id, $args = null ) {
elseif ( isset( $_POST ) && count( $_POST ) ) // Like for async-upload where $_GET['post_id'] isn't set elseif ( isset( $_POST ) && count( $_POST ) ) // Like for async-upload where $_GET['post_id'] isn't set
$calling_post_id = $post->post_parent; $calling_post_id = $post->post_parent;
if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id )
$thumbnail = "<a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>"; $thumbnail = "<a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as featured image" ) . "</a>";
if ( ( $send || $thumbnail || $delete ) && !isset( $form_fields['buttons'] ) ) if ( ( $send || $thumbnail || $delete ) && !isset( $form_fields['buttons'] ) )
$form_fields['buttons'] = array( 'tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>$send $thumbnail $delete</td></tr>\n" ); $form_fields['buttons'] = array( 'tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>$send $thumbnail $delete</td></tr>\n" );

View File

@ -1143,7 +1143,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
*/ */
function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
global $content_width, $_wp_additional_image_sizes; global $content_width, $_wp_additional_image_sizes;
$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>'; $content = '<p class="hide-if-no-js"><a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . esc_html__( 'Set featured image' ) . '</a></p>';
if ( $thumbnail_id && get_post( $thumbnail_id ) ) { if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
$old_content_width = $content_width; $old_content_width = $content_width;
@ -1154,7 +1154,7 @@ function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
$thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' ); $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'post-thumbnail' );
if ( !empty( $thumbnail_html ) ) { if ( !empty( $thumbnail_html ) ) {
$content = '<a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>'; $content = '<a href="#" id="set-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>';
$content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove thumbnail' ) . '</a></p>'; $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail();return false;">' . esc_html__( 'Remove featured image' ) . '</a></p>';
} }
$content_width = $old_content_width; $content_width = $old_content_width;
} }

View File

@ -391,7 +391,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), '20091210b' ); $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), '20091210b' );
$scripts->add_data( 'set-post-thumbnail', 'group', 1 ); $scripts->add_data( 'set-post-thumbnail', 'group', 1 );
$scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array( $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array(
'setThumbnail' => __( 'Use as thumbnail' ), 'setThumbnail' => __( 'Use as featured image' ),
'saving' => __( 'Saving...' ), 'saving' => __( 'Saving...' ),
'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ), 'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ),
'done' => __( 'Done' ) 'done' => __( 'Done' )