post_thumbnail_html хук-фильтр . WP 2.9.0
Filters the post thumbnail HTML.
Использование
add_filter( 'post_thumbnail_html', 'filter_function_name_718', 10, 5 ); function filter_function_name_718( $html, $post_id, $post_thumbnail_id, $size, $attr ){ // filter... return $html; }
- $html(строка)
- The post thumbnail HTML.
- $post_id(число)
- The post ID.
- $post_thumbnail_id(число)
- The post thumbnail ID.
- $size(строка/число[])
- Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
- $attr(строка)
- Query string of attributes.
Список изменений
С версии 2.9.0 | Введена. |
Где вызывается хук
wp-includes/post-thumbnail-template.php 209
return apply_filters( 'post_thumbnail_html', $html, $post->ID, $post_thumbnail_id, $size, $attr );