WordPress.org

Make WordPress Core

Ticket #9932: 9932.patch

File 9932.patch, 1.0 KB (added by ramiy, 9 years ago)

wp_lostpassword_url()

  • wp-includes/general-template.php

     
    197197}
    198198
    199199/**
     200 * Returns the Lost Password URL.
     201 *
     202 * Returns the URL that allows the user to retriev the lost password
     203 *
     204 * @since 2.8
     205 * @uses site_url() To generate the lost password URL
     206 * @uses apply_filters() calls 'lostpassword_url' hook on final login url
     207 *
     208 * @param string $redirect Path to redirect to on login.
     209 */
     210function wp_lostpassword_url($redirect = '') {
     211        $lostpassword_url = site_url('wp-login.php?action=lostpassword', 'login')
     212
     213        if ( !empty($redirect) ) {
     214                $lostpassword_url = add_query_arg('redirect_to', urlencode($redirect), $lostpassword_url);
     215        }
     216
     217        return apply_filters('lostpassword', $lostpassword_url, $redirect);
     218}
     219
     220/**
    200221 * Display the Registration or Admin link.
    201222 *
    202223 * Display a link which allows the user to navigate to the registration page if