get_image_tag filter-hook . WP 2.6.0
Filters the HTML content for the image tag.
Usage
add_filter( 'get_image_tag', 'filter_function_name_577', 10, 6 ); function filter_function_name_577( $html, $id, $alt, $title, $align, $size ){ // filter... return $html; }
- $html(string)
- HTML content for the image.
- $id(int)
- Attachment ID.
- $alt(string)
- Image description for the alt attribute.
- $title(string)
- Image description for the title attribute.
- $align(string)
- Part of the class name for aligning the image.
- $size(string|int[])
- Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
Changelog
Since 2.6.0 | Introduced. |
Where the hook is called
get_image_tag
wp-includes/media.php 411
return apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );