learndash_safe_redirect

learndash_safe_redirect( string $location = '',  int $status = null,  bool $exit = true,  string $context = '' )

Utility function to centralize all LearnDash redirect calls.


Description #


Parameters #

$location

(string) (Optional) The URL to redirect the user to.

Default value: ''

$status

(int) (Optional) The HTTP Status to set. Default 302.

Default value: null

$exit

(bool) (Optional) True if the function should exit on successful redirect.

Default value: true

$context

(string) (Optional) Unique string provided by the caller to help filter conditions.

Default value: ''


Return #

(bool) The redirect status. Only if $exit is not true.


Source #

File: includes/ld-misc-functions.php


Changelog #

Changelog
Version Description
3.2.3 Introduced.