Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_get_attachment_caption

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
5676
5677      /**
5678       * Filters the attachment caption.
5679       *
5680       * @since 4.6.0
5681       *
5682       * @param string $caption Caption for the given attachment.
5683       * @param int    $post_id Attachment ID.
5684       */
5685      return apply_filters( 'wp_get_attachment_caption', $caption, $post->ID );
5686 }
5687
5688 /**
5689  * Retrieve thumbnail for an attachment.
5690  *
5691  * @since 2.1.0
5692  *
5693  * @param int $post_id Optional. Attachment ID. Default 0.
5694  * @return string|false False on failure. Thumbnail file path on success.