WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
1520 | // If the hash is still md5... |
1521 | if ( strlen($hash) <= 32 ) { |
1522 | $check = ( $hash == md5($password) ); |
1523 | if ( $check && $user_id ) { |
1524 | // Rehash using new hash. |
1525 | wp_set_password($password, $user_id); |
1526 | $hash = wp_hash_password($password); |
1527 | } |
1528 |
|
1529 | return apply_filters('check_password', $check, $password, $hash, $user_id); |
1530 | } |
1531 |
|
1532 | // If the stored hash is longer than an MD5, presume the |
1533 | // new style phpass portable hash. |
1534 | if ( empty($wp_hasher) ) { |
1535 | require_once( ABSPATH . 'wp-includes/class-phpass.php'); |
1536 | // By default, use the portable hash from phpass |
1537 | $wp_hasher = new PasswordHash(8, TRUE); |
1538 | } |
1539 |
|
1540 | $check = $wp_hasher->CheckPassword($password, $hash); |
1541 |
|
1542 | return apply_filters('check_password', $check, $password, $hash, $user_id); |
1543 | } |
1544 | endif; |
1545 |
|
1546 | if ( !function_exists('wp_generate_password') ) : |
1547 | /** |
1548 | * Generates a random password drawn from the defined set of characters. |
1549 | * |
1550 | * @since 2.5 |
1551 | * |