dozent_redirect( string $location = 'back' )

Redirects to another page.


Description

IF leave $location argument, it will redirect you to back.

Example usage:

dozent_redirect();

Note: Redirect work by Location : Header, so use this function before print anything.


Parameters

$location

(string) (Optional) URL

Default value: 'back'


Source

File: includes/core-functions.php

	function dozent_redirect( $location = 'back' ) {

		if ( $location === 'back' ) {
			$location = wp_get_raw_referer();
		}

		if ( $location ) {
			wp_redirect( $location );
			die();
		}
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.