Make WordPress Core


Ignore:
Timestamp:
12/10/2009 06:14:36 AM (15 years ago)
Author:
markjaquith
Message:

Post/Page Image was too generic a name. Post/Page Thumbnail is more clear, even if you can create very large thumbnail images if you so choose.

File:
1 edited

Legend:

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

    r12342 r12351  
    184184
    185185/**
    186  * Registers an image size for the post image
    187  */
    188 function set_post_image_size( $width = 0, $height = 0, $crop = FALSE ) {
    189     add_image_size( 'post-image', $width, $height, $crop );
     186 * Registers an image size for the post thumbnail
     187 */
     188function set_post_thumbnail_size( $width = 0, $height = 0, $crop = FALSE ) {
     189    add_image_size( 'post-thumbnail', $width, $height, $crop );
    190190}
    191191
     
    579579
    580580/**
    581  * Adds a 'wp-post-image' class to post image thumbnails
    582  * Uses the begin_fetch_post_image_html and end_fetch_post_image_html action hooks to
    583  * dynamically add/remove itself so as to only filter post image thumbnails
     581 * Adds a 'wp-post-image' class to post thumbnail thumbnails
     582 * Uses the begin_fetch_post_thumbnail_html and end_fetch_post_thumbnail_html action hooks to
     583 * dynamically add/remove itself so as to only filter post thumbnail thumbnails
    584584 *
    585585 * @author Mark Jaquith
     
    588588 * @return array
    589589 */
    590 function _wp_post_image_class_filter( $attr ) {
     590function _wp_post_thumbnail_class_filter( $attr ) {
    591591    $attr['class'] .= ' wp-post-image';
    592592    return $attr;
     
    594594
    595595/**
    596  * Adds _wp_post_image_class_filter to the wp_get_attachment_image_attributes filter
     596 * Adds _wp_post_thumbnail_class_filter to the wp_get_attachment_image_attributes filter
    597597 *
    598598 * @author Mark Jaquith
    599599 * @since 2.9.0
    600600 */
    601 function _wp_post_image_class_filter_add( $attr ) {
    602     add_filter( 'wp_get_attachment_image_attributes', '_wp_post_image_class_filter' );
    603 }
    604 
    605 /**
    606  * Removes _wp_post_image_class_filter from the wp_get_attachment_image_attributes filter
     601function _wp_post_thumbnail_class_filter_add( $attr ) {
     602    add_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
     603}
     604
     605/**
     606 * Removes _wp_post_thumbnail_class_filter from the wp_get_attachment_image_attributes filter
    607607 *
    608608 * @author Mark Jaquith
    609609 * @since 2.9.0
    610610 */
    611 function _wp_post_image_class_filter_remove( $attr ) {
    612     remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_image_class_filter' );
     611function _wp_post_thumbnail_class_filter_remove( $attr ) {
     612    remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
    613613}
    614614
Note: See TracChangeset for help on using the changeset viewer.