bp_document_download_error( string $message, string $title = '', integer $status = 404 )

Die with an error message if the download fails.

Description

Parameters

$message

(Required) Error message.

$title

(Optional) Error title.

Default value: ''

$status

(Optional) Error status.

Default value: 404

Source

File: bp-document/bp-document-filters.php

function bp_document_download_error( $message, $title = '', $status = 404 ) {
	if ( ! strstr( $message, '<a ' ) ) {
		$message .= ' <a href="' . esc_url( site_url() ) . '" class="bp-document-forward">' . esc_html__( 'Go to document', 'buddyboss' ) . '</a>';
	}
	wp_die( $message, $title, array( 'response' => $status ) ); // WPCS: XSS ok.
}

Changelog

Changelog
Version Description
BuddyBoss 1.4.1 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.