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 |
---|---|
780 | if ( $permalink ) |
781 | $url = get_attachment_link($_post->ID); |
782 |
|
783 | $post_title = attribute_escape($_post->post_title); |
784 |
|
785 | $link_text = wp_get_attachment_image($id, $size, $icon); |
786 | if ( !$link_text ) |
787 | $link_text = $_post->post_title; |
788 |
|
789 | return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon ); |
790 | } |
791 |
|
792 | /** |
793 | * Retrieve HTML content of attachment image with link. |
794 | * |
795 | * @since 2.0.0 |
796 | * @deprecated Use {@link wp_get_attachment_link()} |
797 | * @see wp_get_attachment_link() Use instead. |
798 | * |