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_create_file_in_uploadswp_embed_handler_audiowp_headpre_handle_404wpmu_delete_blog_upload_dir
相关方法
wp_handle_upload_wp_handle_uploadwp_handle_sideloadwp_import_handle_uploadmedia_handle_uploadwp_get_upload_dir
引入
2.1.0
弃用
-

wp_handle_upload: 这是一个WordPress函数,用于处理上传文件。它接受文件信息,并将其存储在服务器上。它还生成一个错误数组,如果上传文件时出现问题,则可以显示错误信息。

过滤上传文件的数据数组。

return apply_filters(

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 12:36:31

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: