attach_session_information filter-hook . WP 4.0.0
Filters the information attached to the newly created session.
Can be used to attach further information to a session.
Usage
add_filter( 'attach_session_information', 'filter_function_name_1714', 10, 2 ); function filter_function_name_1714( $session, $user_id ){ // filter... return $session; }
- $session(array)
- Array of extra data.
- $user_id(int)
- User ID.
Changelog
Since 4.0.0 | Introduced. |
Where the hook is called
attach_session_information
wp-includes/class-wp-session-tokens.php 133
$session = apply_filters( 'attach_session_information', array(), $this->user_id );