Changeset 12351 for trunk/wp-includes/media.php
- Timestamp:
- 12/10/2009 06:14:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r12342 r12351 184 184 185 185 /** 186 * Registers an image size for the post image187 */ 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 */ 188 function set_post_thumbnail_size( $width = 0, $height = 0, $crop = FALSE ) { 189 add_image_size( 'post-thumbnail', $width, $height, $crop ); 190 190 } 191 191 … … 579 579 580 580 /** 581 * Adds a 'wp-post-image' class to post imagethumbnails582 * Uses the begin_fetch_post_ image_html and end_fetch_post_image_html action hooks to583 * dynamically add/remove itself so as to only filter post imagethumbnails581 * 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 584 584 * 585 585 * @author Mark Jaquith … … 588 588 * @return array 589 589 */ 590 function _wp_post_ image_class_filter( $attr ) {590 function _wp_post_thumbnail_class_filter( $attr ) { 591 591 $attr['class'] .= ' wp-post-image'; 592 592 return $attr; … … 594 594 595 595 /** 596 * Adds _wp_post_ image_class_filter to the wp_get_attachment_image_attributes filter596 * Adds _wp_post_thumbnail_class_filter to the wp_get_attachment_image_attributes filter 597 597 * 598 598 * @author Mark Jaquith 599 599 * @since 2.9.0 600 600 */ 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 filter601 function _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 607 607 * 608 608 * @author Mark Jaquith 609 609 * @since 2.9.0 610 610 */ 611 function _wp_post_ image_class_filter_remove( $attr ) {612 remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_ image_class_filter' );611 function _wp_post_thumbnail_class_filter_remove( $attr ) { 612 remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' ); 613 613 } 614 614
Note: See TracChangeset
for help on using the changeset viewer.