Opened 7 years ago
Closed 6 years ago
#42108 closed enhancement (fixed)
Pass on the return from wp_redirect for wp_safe_redirect
Reported by: | Drivingralle | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | 2.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
While browsing WP documentation I noticed that the wp_redirect
function returns a bool so a script can react to it.
https://developer.wordpress.org/reference/functions/wp_redirect/#description
As it's recommended to use wp_safe_redirect
to redirect within the site. It would be good to make them exchangeable. So developers can more easy enhance code within there plugins to make it more safe. Even if they rely on the returned value.
Pro:
Both functions work more uniformly.
Con:
I can't think of downsides.
I attempted to create a patch.
Attachments (4)
Change History (22)
#1
@
7 years ago
- Keywords dev-feedback has-patch added
- Summary changed from Pass on the returb from wp_redirect for wp_safe_redirect to Pass on the return from wp_redirect for wp_safe_redirect
#2
@
7 years ago
- Component changed from Bootstrap/Load to Administration
- Keywords early added; dev-feedback removed
Sounds good to me. Patch looks good too.
#3
@
7 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to Future Release
- Owner set to SergeyBiryukov
- Status changed from new to accepted
#7
@
7 years ago
At contributor day for WordCamp Cologne @ocean90 and I reviewed my earlier patch.
I modified the patch for better documentation and better readability.
#11
@
6 years ago
- Keywords needs-patch added; has-patch early commit removed
- Milestone changed from 5.0 to 5.0.1
- Resolution fixed deleted
- Status changed from closed to reopened
@since
needs updating
#15
@
6 years ago
- Keywords commit added
Hi, I updated @since
to 5.0.3 floowing @Drivingralle 's last patch.
#16
@
6 years ago
- Keywords commit removed
- Milestone changed from 5.0.3 to 5.1
Let's just update the since
and leave this in 5.1. @audrasjb can you say why the description was also changed in 42108.2.diff?
pass the return from wp_redirect on