wp_handle_upload

过滤钩子


参数
  • (array)
    $upload
    {
    Array of upload data.

    @type string $file Filename of the newly-uploaded file.
    @type string $url URL of the newly-uploaded file.
    @type string $type Mime type of the newly-uploaded file.
    }

    Required:
    Default:
  • (string)
    $context
    The type of upload action. Values include ‘upload’ or ‘sideload’.
    Required:
    Default: $action ? ‘sideload’ : ‘upload’
定义位置
  • wp-admin/includes/file.php
    , line 1036
引入
2.1.0
弃用

过滤上传文件的数据阵列。

return apply_filters(