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:
定义位置
  • wp-admin/includes/image.php
    , line 568
引入
3.9.0
弃用

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

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