wpseek.com
WordPress开发者和主题制作者的搜索引擎



pre_upload_error › WordPress过滤钩子

Since2.1.0
已弃用n/a
› apply_filters( 'pre_upload_error', false )
参数:
  • () error Error message to return instead of uploading, or false to allow the upload. Default false.
    Required: Yes
定义在:
文档:

Filters whether to preempt the XML-RPC media upload.

Returning a truthy value will effectively short-circuit the media upload, returning that value as a 500 error instead.




源码

$upload_err = apply_filters( 'pre_upload_error', false );