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 |
|---|---|
| 1906 | /** |
| 1907 | * Filter the WordPress salt. |
| 1908 | * |
| 1909 | * @since 2.5.0 |
| 1910 | * |
| 1911 | * @param string $cached_salt Cached salt for the given scheme. |
| 1912 | * @param string $scheme Authentication scheme. Values include 'auth', |
| 1913 | * 'secure_auth', 'logged_in', and 'nonce'. |
| 1914 | */ |
| 1915 | return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); |
| 1916 | } |
| 1917 | |
| 1918 | static $duplicated_keys; |
| 1919 | if ( null === $duplicated_keys ) { |
| 1920 | $duplicated_keys = array( 'put your unique phrase here' => true ); |
| 1921 | foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) { |
| 1922 | foreach ( array( 'KEY', 'SALT' ) as $second ) { |
| 1923 | if ( ! defined( "{$first}_{$second}" ) ) { |
| 1924 | continue; |
| Line | Code |
| 1961 | update_site_option( 'secret_key', $values['key'] ); |
| 1962 | } |
| 1963 | } |
| 1964 | $values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] ); |
| 1965 | } |
| 1966 | |
| 1967 | $cached_salts[ $scheme ] = $values['key'] . $values['salt']; |
| 1968 | |
| 1969 | /** This filter is documented in wp-includes/pluggable.php */ |
| 1970 | return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); |
| 1971 | } |
| 1972 | endif; |
| 1973 | |
| 1974 | if ( !function_exists('wp_hash') ) : |
| 1975 | /** |
| 1976 | * Get hash of given string. |
| 1977 | * |
| 1978 | * @since 2.0.3 |
| 1979 | * |