[wp-trac] [WordPress Trac] #42108: Pass on the returb from wp_redirect for wp_safe_redirect

WordPress Trac noreply at wordpress.org
Thu Oct 5 15:20:06 UTC 2017


#42108: Pass on the returb from wp_redirect for wp_safe_redirect
----------------------------+-----------------------------
 Reporter:  Drivingralle    |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Bootstrap/Load  |    Version:  4.8.2
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42108>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list