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