wp_get_attachment_thumb_url filter-hookWP 2.1.0

Filters the attachment thumbnail URL.

Usage

add_filter( 'wp_get_attachment_thumb_url', 'wp_kama_get_attachment_thumb_url_filter', 10, 2 );

/**
 * Function for `wp_get_attachment_thumb_url` filter-hook.
 * 
 * @param string $url     URL for the attachment thumbnail.
 * @param int    $post_id Attachment ID.
 *
 * @return string
 */
function wp_kama_get_attachment_thumb_url_filter( $url, $post_id ){

	// filter...
	return $url;
}
$url(string)
URL for the attachment thumbnail.
$post_id(int)
Attachment ID.

Changelog

Since 2.1.0 Introduced.

Where the hook is called

wp_get_attachment_thumb_url()
wp_get_attachment_thumb_url
wp-includes/post.php 6782
return apply_filters( 'wp_get_attachment_thumb_url', $url, $post->ID );

Where the hook is used in WordPress

Usage not found.