[wp-trac] [WordPress Trac] #54952: 5.9 breaks auth_redirect?
WordPress Trac
noreply at wordpress.org
Thu Jan 27 14:15:53 UTC 2022
#54952: 5.9 breaks auth_redirect?
--------------------------+------------------------------
Reporter: EPinci | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.9
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by swissspidy):
* keywords: => close
Comment:
I am quite surprised that this used to work for you. Because from a
technical perspective it's not possible.
Shortcodes are used in post content. Post content is rendered after lots
of HTML content (e.g. the `<head>` of your page) has already rendered. At
this point, HTTP headers are already sent by PHP.
At this point it's simply not possible to trigger redirects, hence the
warning.
If you need t trigger redirects, you need to do this by hooking in some
early action and not do that in a shortcode.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54952#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list