Opened 9 years ago
Closed 8 years ago
#42108 closed enhancement (fixed)
Pass on the return from wp_redirect for wp_safe_redirect
| Reported by: | Drivingralle | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | General | Version: | 2.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
9 years ago
- Keywords dev-feedback has-patch added
- Summary Pass on the returb from wp_redirect for wp_safe_redirect → Pass on the return from wp_redirect for wp_safe_redirect
#2
@
9 years ago
- Component Bootstrap/Load → Administration
- Keywords early added; dev-feedback removed
Sounds good to me. Patch looks good too.
#3
@
9 years ago
- Keywords commit added
- Milestone Awaiting Review → Future Release
- Owner set to
- Status new → accepted
#7
@
9 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
@
8 years ago
- Keywords needs-patch added; has-patch early commit removed
- Milestone 5.0 → 5.0.1
- Resolution fixed
- Status closed → reopened
@since needs updating
#15
@
8 years ago
- Keywords commit added
Hi, I updated @since to 5.0.3 floowing @Drivingralle 's last patch.
#16
@
8 years ago
- Keywords commit removed
- Milestone 5.0.3 → 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?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
pass the return from wp_redirect on