хук-фильтр
since 4.4.0
embed_thumbnail_image_shape
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
apply_filters( 'embed_thumbnail_image_shape', string $shape, int $thumbnail_id )
Описание
Прямоугольные изображения отображаются над заголовком, а квадратные — рядом с содержимым.
Оригинал (английский)
Rectangular images are shown above the title while square images are shown next to the content.
Фильтруемое значение
Форма миниатюры. Либо 'rectangular', либо 'square'.
Параметры
$shape
string
обязательный
Форма миниатюры. Либо 'rectangular', либо 'square'.
$thumbnail_id
int
обязательный
Идентификатор вложения.
Исходный код
wp-includes/theme-compat/embed-content.php:75
$shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id );
История изменений
| Версия | Описание |
|---|---|
| 4.5.0 | Added $thumbnail_id parameter. |
| 4.4.0 | Introduced. |

