learndash_safe_redirect( string $location = '', int $status = null, bool $exit = true, string $context = '' )
Utility function to centralize all LearnDash redirect calls.
Description Description
Parameters Parameters
- $location
-
(Optional) The URL to redirect the user to.
Default value: ''
- $status
-
(Optional) The HTTP Status to set. Default 302.
Default value: null
- $exit
-
(Optional) True if the function should exit on successful redirect.
Default value: true
- $context
-
(Optional) Unique string provided by the caller to help filter conditions.
Default value: ''
Return Return
(bool) The redirect status. Only if $exit is not true.
Source Source
File: includes/ld-misc-functions.php
Changelog Changelog
Version | Description |
---|---|
3.2.3 | Introduced. |