attach_session_information WordPress Filter Hook

This hook allows you to attach arbitrary data to a user session. This can be useful for storing information about the user's current state, such as their current location or the page they are on.

apply_filters( 'attach_session_information', array $session, int $user_id ) #

Filters the information attached to the newly created session.


Description

Can be used to attach further information to a session.


Top ↑

Parameters

$session

(array)Array of extra data.

$user_id

(int)User ID.


Top ↑

Source

File: wp-includes/class-wp-session-tokens.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.