WordPress.org

Make WordPress Core

Ticket #22254: 22254.diff

File 22254.diff, 625 bytes (added by MikeHansenMe, 9 years ago)

send logged out user straight to login form

  • wp-includes/functions.php

     
    19621962function wp_nonce_ays( $action ) {
    19631963        $title = __( 'WordPress Failure Notice' );
    19641964        if ( 'log-out' == $action ) {
     1965                if ( ! is_user_logged_in() ) {
     1966                        wp_redirect( wp_login_url() );
     1967                        exit();
     1968                }
    19651969                $html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
    19661970                $html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
    19671971        } else {