Make WordPress Core

#57464 closed defect (bug) (fixed)

non-existant filter referenced in the DocBlock of wp_safe_redirect() and wp_redirect()

Reported by: pbiron's profile pbiron Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: normal Version: 4.6
Component: HTTP API Keywords: needs-patch
Focuses: docs Cc:

Description

The DocBlocks of wp_safe_redirect() and wp_redirect() reference a wp_redirect_location filter, which doesn't exist.

I'm not sure what filter is intended, but maybe either wp_redirect_status or wp_safe_redirect_fallback?

Change History (6)

#1 @pbiron
23 months ago

  • Focuses docs added

#2 @audrasjb
23 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

#3 follow-up: @audrasjb
23 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.2
  • Version set to 5.1

Introduced in [42206].

We can probably completely remove this reference :)

#4 in reply to: ↑ 3 @pbiron
23 months ago

Replying to audrasjb:

Introduced in [42206].

We can probably completely remove this reference :)

Would probably be good to hear from @Drivingralle and/or @johnbillion as to the original intention.

#5 @SergeyBiryukov
23 months ago

  • Version changed from 5.1 to 4.6

It looks like the wp_redirect_location filter reference was originally introduced in [37863], while [42206] copied it from wp_redirect() to wp_safe_redirect().

From my reading, wp_redirect_status appears to be the intended reference instead.

#6 @johnbillion
23 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55069:

HTTP API: Correct the name of a filter referenced in the docs for wp_redirect() and wp_safe_redirect().

Props pbiron, audrasjb, SergeyBiryukov

Fixes #57464

Note: See TracTickets for help on using tickets.