apply_filters( ‘pre_upload_error’, bool $error )

Filters whether to preempt the XML-RPC media upload.

Description

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

Parameters

$errorbool
Whether to pre-empt the media upload. Default false.

Source

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

Changelog

VersionDescription
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.