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 |
|---|---|
| 2483 | /** |
| 2484 | * Filters the WordPress salt. |
| 2485 | * |
| 2486 | * @since 2.5.0 |
| 2487 | * |
| 2488 | * @param string $cached_salt Cached salt for the given scheme. |
| 2489 | * @param string $scheme Authentication scheme. Values include 'auth', |
| 2490 | * 'secure_auth', 'logged_in', and 'nonce'. |
| 2491 | */ |
| 2492 | return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); |
| 2493 | } |
| 2494 | |
| 2495 | static $duplicated_keys; |
| 2496 | if ( null === $duplicated_keys ) { |
| 2497 | $duplicated_keys = array(); |
| 2498 | |
| 2499 | foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) { |
| 2500 | foreach ( array( 'KEY', 'SALT' ) as $second ) { |
| 2501 | if ( ! defined( "{$first}_{$second}" ) ) { |
| Line | Code |
| 2583 | update_site_option( 'secret_key', $values['key'] ); |
| 2584 | } |
| 2585 | } |
| 2586 | $values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] ); |
| 2587 | } |
| 2588 | |
| 2589 | $cached_salts[ $scheme ] = $values['key'] . $values['salt']; |
| 2590 | |
| 2591 | /** This filter is documented in wp-includes/pluggable.php */ |
| 2592 | return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); |
| 2593 | } |
| 2594 | endif; |
| 2595 | |
| 2596 | if ( ! function_exists( 'wp_hash' ) ) : |
| 2597 | /** |
| 2598 | * Gets the hash of the given string. |
| 2599 | * |
| 2600 | * The default algorithm is md5 but can be changed to any algorithm supported by |
| 2601 | * `hash_hmac()`. Use the `hash_hmac_algos()` function to check the supported |