end_fetch_post_thumbnail_html
Action HookDescription
Fires after fetching the post thumbnail HTML.Hook Information
File Location |
wp-includes/post-thumbnail-template.php
View on GitHub
|
Hook Type | Action |
Line Number | 218 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$post_id
|
The post ID. |
int
|
$post_thumbnail_id
|
The post thumbnail ID. |
string|int[]
|
$size
|
Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order). |
Usage Examples
Basic Usage
<?php
// Hook into end_fetch_post_thumbnail_html
add_action('end_fetch_post_thumbnail_html', 'my_custom_function', 10, 3);
function my_custom_function($post_id, $post_thumbnail_id, $size) {
// Your custom code here
}
Source Code Context
wp-includes/post-thumbnail-template.php:218
- How this hook is used in WordPress core
<?php
213 * @param int $post_id The post ID.
214 * @param int $post_thumbnail_id The post thumbnail ID.
215 * @param string|int[] $size Requested image size. Can be any registered image size name, or
216 * an array of width and height values in pixels (in that order).
217 */
218 do_action( 'end_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size );
219
220 } else {
221 $html = '';
222 }
223
PHP Documentation
<?php
/**
* Fires after fetching the post thumbnail HTML.
*
* @since 2.9.0
*
* @param int $post_id The post ID.
* @param int $post_thumbnail_id The post thumbnail ID.
* @param string|int[] $size Requested image size. Can be any registered image size name, or
* an array of width and height values in pixels (in that order).
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-includes/post-thumbnail-template.php
Related Hooks
Related hooks will be displayed here in future updates.