pre_upload_error

pre_upload_error

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('pre_upload_error') is found 1 times:

  • /wp-includes/class-wp-xmlrpc-server.php line 6428
    		 * @since 2.1.0
    		 *
    		 * @param bool $error Whether to pre-empt the media upload. Default false.
    		 */
    		$upload_err = apply_filters( 'pre_upload_error', false );
    		if ( $upload_err ) {
    			return new IXR_Error( 500, $upload_err );
    		}
    
    		$upload = wp_upload_bits( $name, null, $bits );
    		if ( ! empty( $upload['error'] ) ) {