Changeset 8029 for trunk/wp-includes/media.php
- Timestamp:
- 05/31/2008 07:12:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r7998 r8029 91 91 } 92 92 93 // return an <img src /> tag for the given image attachment, scaling it down if requested 93 /** 94 * An <img src /> tag for an image attachment, scaling it down if requested. 95 * 96 * {@internal Missing Long Description}} 97 * 98 * @uses apply_filters() The 'get_image_tag_class' filter is the IMG element 99 * class attribute. 100 * @uses apply_filters() The 'get_image_tag' filter is the full IMG element with 101 * all attributes. 102 * 103 * @param int $id Attachment ID. 104 * @param string $alt Image Description for the alt attribute. 105 * @param string $title Image Description for the title attribute. 106 * @param string $align Part of the class name for aligning the image. 107 * @param string $size Optional. Default is 'medium'. 108 * @return string HTML IMG element for given image attachment 109 */ 94 110 function get_image_tag($id, $alt, $title, $align, $size='medium') { 95 111 … … 97 113 $hwstring = image_hwstring($width, $height); 98 114 99 $html = '<img src="'.attribute_escape($img_src).'" alt="'.attribute_escape($alt).'" title="'.attribute_escape($title).'" '.$hwstring.'class="align'.attribute_escape($align).' size-'.attribute_escape($size).' wp-image-'.$id.'" />'; 115 $class = 'align'.attribute_escape($align).' size-'.attribute_escape($size).' wp-image-'.$id; 116 $class = apply_filters('get_image_tag_class', $class, $id, $align, $size); 117 118 $html = '<img src="'.attribute_escape($img_src).'" alt="'.attribute_escape($alt).'" title="'.attribute_escape($title).'" '.$hwstring.'class="'.$class.'" />'; 100 119 101 120 $html = apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );
Note: See TracChangeset
for help on using the changeset viewer.