Filter hook 'lostpassword_url'

in WP Core File wp-includes/general-template.php at line 684

View Source

lostpassword_url

Filter Hook
Description
Filters the Lost Password URL.

Hook Information

File Location wp-includes/general-template.php View on GitHub
Hook Type Filter
Line Number 684

Hook Parameters

Type Name Description
string $lostpassword_url The lost password page URL.
string $redirect The path to redirect to on login.

Usage Examples

Basic Usage
<?php
// Hook into lostpassword_url
add_filter('lostpassword_url', 'my_custom_filter', 10, 2);

function my_custom_filter($lostpassword_url, $redirect) {
    // Your custom filtering logic here
    return $lostpassword_url;
}

Source Code Context

wp-includes/general-template.php:684 - How this hook is used in WordPress core
<?php
 679  	 * @since 2.8.0
 680  	 *
 681  	 * @param string $lostpassword_url The lost password page URL.
 682  	 * @param string $redirect         The path to redirect to on login.
 683  	 */
 684  	return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
 685  }
 686  
 687  /**
 688   * Displays the Registration or Admin link.
 689   *

PHP Documentation

<?php
/**
	 * Filters the Lost Password URL.
	 *
	 * @since 2.8.0
	 *
	 * @param string $lostpassword_url The lost password page URL.
	 * @param string $redirect         The path to redirect to on login.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.