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.


Top ↑

Parameters

$shape

(string)Thumbnail image shape. Either 'rectangular' or 'square'.

$thumbnail_id

(int)Attachment ID.


Top ↑

Source

File: wp-includes/theme-compat/embed-content.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
4.5.0Added $thumbnail_id parameter.
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.