attachment_thumbnail_args

过滤钩子
apply_filters( 'attachment_thumbnail_args', $image_attachment, $metadata, $uploaded )
参数
  • (array) $image_attachment An array of parameters to create the thumbnail.
    Required:
  • (array) $metadata Current attachment metadata.
    Required:
  • (array) $uploaded { Information about the newly-uploaded file. @type string $file Filename of the newly-uploaded file. @type string $url URL of the uploaded file. @type string $type File type. }
    Required:
定义位置
相关勾子
admin_post_thumbnail_sizethe_post_thumbnail_captionadmin_post_thumbnail_htmlpost_thumbnail_urlattachment_link
相关方法
wp_ajax_set_attachment_thumbnailwp_get_attachment_thumb_urlthe_post_thumbnail_urlwp_get_attachment_thumb_filethe_post_thumbnailwp_attachment_is
引入
3.9.0
弃用
-

attachment_thumbnail_args: 这个过滤器允许开发者修改WordPress中为附件生成缩略图的参数。

过滤创建附件缩略图的参数。

$image_attachment = apply_filters( 'attachment_thumbnail_args', $image_attachment, $metadata, $uploaded );

常见问题

FAQs
查看更多 >