Make WordPress Core

Ticket #43407: 43407.patch

File 43407.patch, 1.2 KB (added by jfarthing84, 4 years ago)
  • wp-includes/general-template.php

     
    292292 * @return string The logout URL. Note: HTML-encoded via esc_html() in wp_nonce_url().
    293293 */
    294294function wp_logout_url( $redirect = '' ) {
    295         $args = array( 'action' => 'logout' );
     295        $args = array();
    296296        if ( ! empty( $redirect ) ) {
    297297                $args['redirect_to'] = urlencode( $redirect );
    298298        }
    299299
    300         $logout_url = add_query_arg( $args, site_url( 'wp-login.php', 'login' ) );
     300        $logout_url = add_query_arg( $args, site_url( 'wp-login.php?action=logout', 'login' ) );
    301301        $logout_url = wp_nonce_url( $logout_url, 'log-out' );
    302302
    303303        /**
     
    498498 * @return string Lost password URL.
    499499 */
    500500function wp_lostpassword_url( $redirect = '' ) {
    501         $args = array( 'action' => 'lostpassword' );
     501        $args = array();
    502502        if ( ! empty( $redirect ) ) {
    503503                $args['redirect_to'] = urlencode( $redirect );
    504504        }
    505505
    506         $lostpassword_url = add_query_arg( $args, network_site_url( 'wp-login.php', 'login' ) );
     506        $lostpassword_url = add_query_arg( $args, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) );
    507507
    508508        /**
    509509         * Filters the Lost Password URL.