WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
984 | * @type int $1 Image width in pixels. |
985 | * @type int $2 Image height in pixels. |
986 | * @type bool $3 Whether the image is a resized image. |
987 | * } |
988 | * @param int $attachment_id Image attachment ID. |
989 | * @param string|int[] $size Requested size of image. Image size name, or array of width |
990 | * and height values (in that order). |
991 | * @param bool $icon Whether the image should be treated as an icon. |
992 | */ |
993 | return apply_filters( 'wp_get_attachment_image_src', $image, $attachment_id, $size, $icon ); |
994 | } |
995 |
|
996 | /** |
997 | * Get an HTML img element representing an image attachment |
998 | * |
999 | * While `$size` will accept an array, it is better to register a size with |
1000 | * add_image_size() so that a cropped version is generated. It's much more |
1001 | * efficient than having to find the closest-sized image and then having the |
1002 | * browser scale down the image. |