Constrain admin thumbnail display to width of meta box while in sidebar. Add filters.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2009-10-10 07:41:42 +00:00
parent 3d1fa0d0d1
commit a0cd792aae
1 changed files with 3 additions and 3 deletions

View File

@ -116,11 +116,11 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal
function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
$thumbnail_html = wp_get_attachment_image($thumbnail_id, 'thumbnail');
$thumbnail_html = wp_get_attachment_image($thumbnail_id, array( 266, 266 ) );
if ( !empty( $thumbnail_html ) )
return '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>';
return apply_filters( 'admin_post_thumbnail_html', '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>' );
}
return '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . esc_html__( 'Set thumbnail' ) . '</a>';
return apply_filters( 'admin_post_thumbnail_html', '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . esc_html__( 'Set thumbnail' ) . '</a>' );
}
function post_thumbnail_meta_box() {