salt
Filters the WordPress salt.
Usage
add_filter( 'salt', 'wp_kama_salt_filter', 10, 2 );
/**
* Function for `salt` filter-hook.
*
* @param string $cached_salt Cached salt for the given scheme.
* @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth', 'logged_in', and 'nonce'.
*
* @return string
*/
function wp_kama_salt_filter( $cached_salt, $scheme ){
// filter...
return $cached_salt;
}
- $cached_salt(string)
- Cached salt for the given scheme.
- $scheme(string)
- Authentication scheme. Values include 'auth', 'secure_auth', 'logged_in', and 'nonce'.
Changelog
| Since 2.5.0 | Introduced. |
Where the hook is called
salt
wp-includes/pluggable.php 2593
return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );
wp-includes/pluggable.php 2693
return apply_filters( 'salt', $cached_salts[ $scheme ], $scheme );