Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#3250 closed defect (bug) (fixed)

Add filter (with cancel ability) to wp_redirect() function

Reported by: markjaquith's profile markjaquith Owned by: markjaquith's profile markjaquith
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: hook has-patch
Focuses: Cc:

Description

Patch adds a filter to the $location in wp_redirect. If $location is false after the filter, the function aborts, which means that a filter would be able to cancel a given redirect.

While writing a plugin today, I happened upon a circumstance where this would have been very useful.

Attachments (1)

wp_redirect.diff (560 bytes) - added by markjaquith 18 years ago.
Patch for trunk

Download all attachments as: .zip

Change History (3)

@markjaquith
18 years ago

Patch for trunk

#1 @ryan
18 years ago

Fine by me.

#2 @markjaquith
18 years ago

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

(In [4407]) Add wp_redirect filter, with cancel ability. fixes #3250

Note: See TracTickets for help on using tickets.