wp_get_attachment_thumb_file filter-hookWP 2.1.0

Filters the attachment thumbnail file path.

Usage

add_filter( 'wp_get_attachment_thumb_file', 'wp_kama_get_attachment_thumb_file_filter', 10, 2 );

/**
 * Function for `wp_get_attachment_thumb_file` filter-hook.
 * 
 * @param string $thumbfile File path to the attachment thumbnail.
 * @param int    $post_id   Attachment ID.
 *
 * @return string
 */
function wp_kama_get_attachment_thumb_file_filter( $thumbfile, $post_id ){

	// filter...
	return $thumbfile;
}
$thumbfile(string)
File path to the attachment thumbnail.
$post_id(int)
Attachment ID.

Changelog

Since 2.1.0 Introduced.

Where the hook is called

wp_get_attachment_thumb_file()
wp_get_attachment_thumb_file
wp-includes/post.php 6735
return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );

Where the hook is used in WordPress

Usage not found.