A WordPress-centric search engine for devs and theme authors



pre_upload_error ›

Since2.1.0
Deprecatedn/a
apply_filters( 'pre_upload_error', false )
Parameters:
  • (bool) $error Whether to pre-empt the media upload. Default false.
    Required: Yes
Defined at:
Codex:

Filters whether to preempt the XML-RPC media upload.

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





Source

if ( $upload_err = apply_filters( 'pre_upload_error', false ) ) {