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 |
|---|---|
| 1167 | * |
| 1168 | * @param string $html HTML img element or empty string on failure. |
| 1169 | * @param int $attachment_id Image attachment ID. |
| 1170 | * @param string|int[] $size Requested image size. Can be any registered image size name, or |
| 1171 | * an array of width and height values in pixels (in that order). |
| 1172 | * @param bool $icon Whether the image should be treated as an icon. |
| 1173 | * @param string[] $attr Array of attribute values for the image markup, keyed by attribute name. |
| 1174 | * See wp_get_attachment_image(). |
| 1175 | */ |
| 1176 | return apply_filters( 'wp_get_attachment_image', $html, $attachment_id, $size, $icon, $attr ); |
| 1177 | } |
| 1178 | |
| 1179 | /** |
| 1180 | * Gets the URL of an image attachment. |
| 1181 | * |
| 1182 | * @since 4.4.0 |
| 1183 | * |
| 1184 | * @param int $attachment_id Image attachment ID. |
| 1185 | * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of |