embed_thumbnail_image_shape WordPress Filter Hook
The embed_thumbnail_image_shape hook is used to set the shape of an embedded thumbnail image. This hook is used by the WordPress core team to ensure that thumbnail images are always displayed in a consistent shape.
apply_filters( 'embed_thumbnail_image_shape', string $shape , int $thumbnail_id ) #
Filters the thumbnail shape for use in the embed template.
Description
Rectangular images are shown above the title while square images are shown next to the content.
Parameters
- $shape
(string)Thumbnail image shape. Either 'rectangular' or 'square'.
- $thumbnail_id
(int)Attachment ID.
Source
Changelog
Version | Description |
---|---|
4.5.0 | Added $thumbnail_id parameter. |
4.4.0 | Introduced. |