Making WordPress.org

Changeset 7696


Ignore:
Timestamp:
09/24/2018 03:46:33 AM (6 years ago)
Author:
dd32
Message:

Login: Allow the /logout route to accept a custom ?redirect_to parameter.
This will allow non-WordPress sites (Trac) to pass their current URL.

See #3821.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/logout.php

    r6493 r7696  
    1111
    1212<?php
     13
     14// This will be validated at redirect time.
     15$redirect_to = !empty( $_GET['redirect_to'] ) ? $_GET['redirect_to'] : home_url( '/loggedout/' );
     16
    1317printf(
    1418    /* translators: %s: logout URL */
    1519    __( 'Do you really want to <a href="%s">log out</a>?', 'wporg' ),
    16     wp_logout_url( home_url( '/loggedout/ ' ) )
     20    wp_logout_url( $redirect_to )
    1721);
    1822?>
Note: See TracChangeset for help on using the changeset viewer.