WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
61 |
|
62 | /** |
63 | * Filters post thumbnail ID. |
64 | * |
65 | * @since 5.9.0 |
66 | * |
67 | * @param int|false $thumbnail_id Post thumbnail ID or false if the post does not exist. |
68 | * @param int|WP_Post|null $post Post ID or WP_Post object. Default is global `$post`. |
69 | */ |
70 | return (int) apply_filters( 'post_thumbnail_id', $thumbnail_id, $post ); |
71 | } |
72 |
|
73 | /** |
74 | * Display the post thumbnail. |
75 | * |
76 | * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size |
77 | * is registered, which differs from the 'thumbnail' image size managed via the |
78 | * Settings > Media screen. |
79 | * |