Just check the source:
515 /**
516 * Filter the Lost Password URL.
517 *
518 * @since 2.8.0
519 *
520 * @param string $lostpassword_url The lost password page URL.
521 * @param string $redirect The path to redirect to on login.
522 */
523 return apply_filters( \'lostpassword_url\', $lostpassword_url, $redirect );
有一个
lostpassword_url
过滤器应该完全按照您的要求进行操作。
function passurl_wpse_208054($lostpassword_url, $redirect ) {
return \'http://path/to/login/url\';
}
add_filter(\'lostpassword_url\', \'passurl_wpse_208054\', 10, 2);