wp_get_attachment_thumb_file хук-фильтрWP 2.1.0

Filters the attachment thumbnail file path.

Использование

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(строка)
File path to the attachment thumbnail.
$post_id(int)
Attachment ID.

Список изменений

С версии 2.1.0 Введена.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.