Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: session_token_manager

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
48      final public static function get_instance( $user_id ) {
49           /**
50            * Filters the class name for the session token manager.
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 the given session token for storage.
63       *
64       * @since 4.0.0
65       *
66       * @param string $token Session token to hash.
 
Line Code
217      }
218
219      /**
220       * Destroys all sessions for all users.
221       *
222       * @since 4.0.0
223       */
224      final public static function destroy_all_for_all_users() {
225           /** This filter is documented in wp-includes/class-wp-session-tokens.php */
226           $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' );
227           call_user_func( array( $manager, 'drop_sessions' ) );
228      }
229
230      /**
231       * Retrieves all sessions for a user.
232       *
233       * @since 4.0.0
234       *
235       * @return array Sessions for a user.