Making WordPress.org


Ignore:
Timestamp:
06/21/2021 06:48:29 AM (3 years ago)
Author:
dd32
Message:

Trac: Replace logout form with logout link that includes the redirect_to parameter, to return the user to the current Trac page afterwards.

Fixes #3821.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/site.html

    r10706 r11047  
    1212
    1313    notifications_enabled = 1 if project_slug in ['core', 'meta'] else 0
     14
     15    import cgi, urllib
     16    current_url = req.abs_href( req.path_info, cgi.parse_qs( req.query_string ) )
     17    current_url_encoded = urllib.quote_plus( current_url )
    1418
    1519    if project_slug == 'bbpress' :
     
    106110<div py:match="div[@id='header']" py:strip=""></div>
    107111<div py:match="div[@id='footer']" py:strip=""></div>
     112
     113<!--! Replace logout form with logout link -->
     114<py:match path="div[@id='metanav']//form[@id='logout']">
     115    <a href="https://login.wordpress.org/logout?redirect_to=$current_url_encoded">Logout</a>
     116</py:match>
    108117
    109118<!--! Notices and instructions when creating a new ticket -->
Note: See TracChangeset for help on using the changeset viewer.