Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#9536 closed enhancement (fixed)

update, and make better use of, login and logout url functions

Reported by: wnorris Owned by: ryan
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: Security Keywords: has-patch needs-review
Focuses: Cc:


I've attached two diffs to this ticket. The first updates the wp_login_url and wp_logout_url functions in two ways. It makes use of add_query_arg() to ensure query parameters are escaped, and it adds a new filter at the end of each method so that plugins can replace the default URL location. You can already do this with site_url, but it requires a lot more work to skip over all the calls to site_url that you don't care about. This allow plugins to hook right in where they need to.

The second diff updates a number of other core files to actually make use of the wp_login_url and wp_logout_url methods. This includes the two included themes, comment templates, new user emails, and a few other places.

All changes should be fully backwards compatible.

Attachments (2)

use-login-links.diff (4.6 KB) - added by wnorris 9 years ago.
update-login-links.diff (1.6 KB) - added by wnorris 9 years ago.

Download all attachments as: .zip

Change History (3)

#1 @ryan
9 years ago

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

(In [10931]) Updates to wp_login_url() and wp_logout_url(). Use them in more places. Props wnorris. fixes #9536

Note: See TracTickets for help on using tickets.