WordPress.org

Make WordPress Core

Changeset 14981


Ignore:
Timestamp:
05/27/10 05:03:46 (4 years ago)
Author:
nacin
Message:

Add some educational tips. Suggest using add_image_size() in the inline docs for image_get_intermediate_size() and wp_get_attachment_image(). props jorbin. see #13556.

File:
1 edited

Legend:

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

    r14979 r14981  
    485485 * The url path will be given, when the $size parameter is a string. 
    486486 * 
    487  * @since 2.5.0 
     487 * If you are passing an array for the $size, you should consider using 
     488 * add_image_size() so that a cropped version is generated. It's much more 
     489 * efficient than having to find the closest-sized image and then having the 
     490 * browser scale down the image. 
     491 * 
     492 * @since 2.5.0 
     493 * @see add_image_size() 
    488494 * 
    489495 * @param int $post_id Attachment ID for image. 
     
    588594 * Get an HTML img element representing an image attachment 
    589595 * 
     596 * While $size will accept an array, it is better to register a size with 
     597 * add_image_size() so that a cropped version is generated. It's much more 
     598 * efficient than having to find the closest-sized image and then having the 
     599 * browser scale down the image. 
     600 * 
     601 * @see add_image_size() 
    590602 * @uses apply_filters() Calls 'wp_get_attachment_image_attributes' hook on attributes array 
    591603 * @uses wp_get_attachment_image_src() Gets attachment file URL and dimensions 
Note: See TracChangeset for help on using the changeset viewer.