WordPress.org

Make WordPress Core

Ticket #16909: 16909.4.patch

File 16909.4.patch, 1012 bytes (added by hakre, 7 years ago)

Triggered by logout of the admin bar on frontend

  • wp-login.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    376376case 'logout' :
    377377        check_admin_referer('log-out');
    378378        wp_logout();
    379 
    380         $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?loggedout=true';
     379        $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : site_url('wp-login.php?loggedout=true', 'login');
    381380        wp_safe_redirect( $redirect_to );
    382381        exit();
    383382
     
    389388        if ( $http_post ) {
    390389                $errors = retrieve_password();
    391390                if ( !is_wp_error($errors) ) {
    392                         $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm';
     391                        $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : site_url('wp-login.php?checkemail=confirm', 'login');
    393392                        wp_safe_redirect( $redirect_to );
    394393                        exit();
    395394                }