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 |
---|---|
2102 | /** |
2103 | * Filters the WordPress salt. |
2104 | * |
2105 | * @since 2.5.0 |
2106 | * |
2107 | * @param string $cached_salt Cached salt for the given scheme. |
2108 | * @param string $scheme Authentication scheme. Values include 'auth', |
2109 | * 'secure_auth', 'logged_in', and 'nonce'. |
2110 | */ |
2111 | return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); |
2112 | } |
2113 |
|
2114 | static $duplicated_keys; |
2115 | if ( null === $duplicated_keys ) { |
2116 | $duplicated_keys = array( 'put your unique phrase here' => true ); |
2117 | foreach ( array( 'AUTH', 'SECURE_AUTH', 'LOGGED_IN', 'NONCE', 'SECRET' ) as $first ) { |
2118 | foreach ( array( 'KEY', 'SALT' ) as $second ) { |
2119 | if ( ! defined( "{$first}_{$second}" ) ) { |
2120 | continue; |
Line | Code |
2157 | update_site_option( 'secret_key', $values['key'] ); |
2158 | } |
2159 | } |
2160 | $values['salt'] = hash_hmac( 'md5', $scheme, $values['key'] ); |
2161 | } |
2162 |
|
2163 | $cached_salts[ $scheme ] = $values['key'] . $values['salt']; |
2164 |
|
2165 | /** This filter is documented in wp-includes/pluggable.php */ |
2166 | return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme ); |
2167 | } |
2168 | endif; |
2169 |
|
2170 | if ( !function_exists('wp_hash') ) : |
2171 | /** |
2172 | * Get hash of given string. |
2173 | * |
2174 | * @since 2.0.3 |
2175 | * |