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 |
|---|---|
| 1447 | // If the hash is still md5... |
| 1448 | if ( strlen($hash) <= 32 ) { |
| 1449 | $check = ( $hash == md5($password) ); |
| 1450 | if ( $check && $user_id ) { |
| 1451 | // Rehash using new hash. |
| 1452 | wp_set_password($password, $user_id); |
| 1453 | $hash = wp_hash_password($password); |
| 1454 | } |
| 1455 | |
| 1456 | return apply_filters('check_password', $check, $password, $hash, $user_id); |
| 1457 | } |
| 1458 | |
| 1459 | // If the stored hash is longer than an MD5, presume the |
| 1460 | // new style phpass portable hash. |
| 1461 | if ( empty($wp_hasher) ) { |
| 1462 | require_once( ABSPATH . 'wp-includes/class-phpass.php'); |
| 1463 | // By default, use the portable hash from phpass |
| 1464 | $wp_hasher = new PasswordHash(8, true); |
| 1465 | } |
| 1466 | |
| 1467 | $check = $wp_hasher->CheckPassword($password, $hash); |
| 1468 | |
| 1469 | return apply_filters('check_password', $check, $password, $hash, $user_id); |
| 1470 | } |
| 1471 | endif; |
| 1472 | |
| 1473 | if ( !function_exists('wp_generate_password') ) : |
| 1474 | /** |
| 1475 | * Generates a random password drawn from the defined set of characters. |
| 1476 | * |
| 1477 | * @since 2.5 |
| 1478 | * |