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 |
|---|---|
| 48 | final public static function get_instance( $user_id ) { |
| 49 | /** |
| 50 | * Filters the session token manager used. |
| 51 | * |
| 52 | * @since 4.0.0 |
| 53 | * |
| 54 | * @param string $session Name of class to use as the manager. |
| 55 | * Default 'WP_User_Meta_Session_Tokens'. |
| 56 | */ |
| 57 | $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' ); |
| 58 | return new $manager( $user_id ); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Hashes a session token for storage. |
| 63 | * |
| 64 | * @since 4.0.0 |
| 65 | * |
| 66 | * @param string $token Session token to hash. |
| Line | Code |
| 221 | |
| 222 | /** |
| 223 | * Destroy all session tokens for all users. |
| 224 | * |
| 225 | * @since 4.0.0 |
| 226 | * @static |
| 227 | */ |
| 228 | final public static function destroy_all_for_all_users() { |
| 229 | /** This filter is documented in wp-includes/class-wp-session-tokens.php */ |
| 230 | $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' ); |
| 231 | call_user_func( array( $manager, 'drop_sessions' ) ); |
| 232 | } |
| 233 | |
| 234 | /** |
| 235 | * Retrieve all sessions of a user. |
| 236 | * |
| 237 | * @since 4.0.0 |
| 238 | * |
| 239 | * @return array Sessions of a user. |