Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_get_attachment_link

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
1694       * @param string       $link_html The page link HTML output.
1695       * @param int|WP_Post  $post      Post ID or object. Can be 0 for the current global post.
1696       * @param string|int[] $size      Requested image size. Can be any registered image size name, or
1697       *                                an array of width and height values in pixels (in that order).
1698       * @param bool         $permalink Whether to add permalink to image. Default false.
1699       * @param bool         $icon      Whether to include an icon.
1700       * @param string|false $text      If string, will be link text.
1701       * @param array|string $attr      Array or string of attributes.
1702       */
1703      return apply_filters( 'wp_get_attachment_link', $link_html, $post, $size, $permalink, $icon, $text, $attr );
1704 }
1705
1706 /**
1707  * Wraps attachment in paragraph tag before content.
1708  *
1709  * @since 2.0.0
1710  *
1711  * @param string $content
1712  * @return string