Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: post_thumbnail_id

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

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  *