Make WordPress Core

Changeset 12018


Ignore:
Timestamp:
10/10/2009 07:41:42 AM (17 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r12007 r12018  
    117117function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
    118118        if ( $thumbnail_id && get_post( $thumbnail_id ) ) {
    119                 $thumbnail_html = wp_get_attachment_image($thumbnail_id, 'thumbnail');
     119                $thumbnail_html = wp_get_attachment_image($thumbnail_id, array( 266, 266 ) );
    120120                if ( !empty( $thumbnail_html ) )
    121                         return '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>';
    122         }
    123         return '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . esc_html__( 'Set thumbnail' ) . '</a>';
     121                        return apply_filters( 'admin_post_thumbnail_html', '<a href="#" id="cws-post-thumbnail" onclick="jQuery(\'#add_image\').click();return false;">' . $thumbnail_html . '</a>' );
     122        }
     123        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>' );
    124124}
    125125
Note: See TracChangeset for help on using the changeset viewer.