embed_thumbnail_image_shape

过滤钩子


apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id )
参数
  • (string)
    $shape
    Thumbnail image shape. Either ‘rectangular’ or ‘square’.
    Required:
  • (int)
    $thumbnail_id
    Attachment ID.
    Required:
定义位置
  • wp-includes/theme-compat/embed-content.php
    , line 75
引入
4.5.0
弃用

过滤在嵌入模板中使用的缩略图形状。

矩形图像显示在标题上方,而方形图像则显示在内容旁边。

$shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id );