WordPress.org

Make WordPress Core

Ticket #11289: ticket-11289-part1.patch

File ticket-11289-part1.patch, 934 bytes (added by miqrogroove, 5 years ago)

Fixes broken function wp_nonce_ays()

  • wp-includes/functions.php

     
    24392439function wp_nonce_ays( $action ) { 
    24402440        $title = __( 'WordPress Failure Notice' ); 
    24412441        $html = esc_html( wp_explain_nonce( $action ) ); 
    2442         if ( wp_get_referer() ) 
     2442        if ( 'log-out' == $action ) 
     2443                $html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() ); 
     2444        elseif ( wp_get_referer() ) 
    24432445                $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; 
    2444         elseif ( 'log-out' == $action ) 
    2445                 $html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() ); 
    24462446 
    2447         wp_die( $html, $title); 
     2447        wp_die( $html, $title, array('response' => 403) ); 
    24482448} 
    24492449 
    24502450/**