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
5185
5186      /**
5187       * Filters the attachment caption.
5188       *
5189       * @since 4.6.0
5190       *
5191       * @param string $caption Caption for the given attachment.
5192       * @param int    $post_id Attachment ID.
5193       */
5194      return apply_filters( 'wp_get_attachment_caption', $caption, $post->ID );
5195 }
5196
5197 /**
5198  * Retrieve thumbnail for an attachment.
5199  *
5200  * @since 2.1.0
5201  *
5202  * @param int $post_id Optional. Attachment ID. Default 0.
5203  * @return string|false False on failure. Thumbnail file path on success.