Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: embed_thumbnail_image_size

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
41                /**
42                 * Filters the thumbnail image size for use in the embed template.
43                 *
44                 * @since 4.4.0
45                 * @since 4.5.0 Added `$thumbnail_id` parameter.
46                 *
47                 * @param string $image_size   Thumbnail image size.
48                 * @param int    $thumbnail_id Attachment ID.
49                 */
50                $image_size = apply_filters( 'embed_thumbnail_image_size', $image_size, $thumbnail_id );
51
52                $shape = $measurements[0] / $measurements[1] >= 1.75 ? 'rectangular' : 'square';
53
54                /**
55                 * Filters the thumbnail shape for use in the embed template.
56                 *
57                 * Rectangular images are shown above the title while square images
58                 * are shown next to the content.
59                 *