Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_get_attachment_image

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1106       *
1107       * @param string       $html          HTML img element or empty string on failure.
1108       * @param int          $attachment_id Image attachment ID.
1109       * @param string|int[] $size          Requested image size. Can be any registered image size name, or
1110       *                                    an array of width and height values in pixels (in that order).
1111       * @param bool         $icon          Whether the image should be treated as an icon.
1112       * @param string[]     $attr          Array of attribute values for the image markup, keyed by attribute name.
1113       *                                    See wp_get_attachment_image().
1114       */
1115      return apply_filters( 'wp_get_attachment_image', $html, $attachment_id, $size, $icon, $attr );
1116 }
1118 /**
1119  * Get the URL of an image attachment.
1120  *
1121  * @since 4.4.0
1122  *
1123  * @param int          $attachment_id Image attachment ID.
1124  * @param string|int[] $size          Optional. Image size. Accepts any registered image size name, or an array of