1.16.x common.inc backdrop_exit($destination = NULL)
1.18.x common.inc backdrop_exit($destination = NULL)
1.17.x common.inc backdrop_exit($destination = NULL)

Performs end-of-request tasks.

In some cases page requests need to end without calling backdrop_page_footer(). In these cases, call backdrop_exit() instead. There should rarely be a reason to call exit instead of backdrop_exit();


$destination: If this function is called from backdrop_goto(), then this argument will be a fully-qualified URL that is the destination of the redirect. This should be passed along to hook_exit() implementations.


includes/common.inc, line 3153
Common functions that many Backdrop modules will need to reference.


function backdrop_exit($destination = NULL) {
  if (backdrop_get_bootstrap_phase() == BACKDROP_BOOTSTRAP_FULL) {
    if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') {
      module_invoke_all('exit', $destination);