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:
parent
3d1fa0d0d1
commit
a0cd792aae
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue