Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

render_csrf_data_attributes()

Description

Render CSRF information as data attributes. Useful to allow JS to run state changing operations

Parameters

ColumnTypeDefaultDescription
$ident

Location

include/render_functions.php lines 3270 to 3276

Definition

 
function render_csrf_data_attributes($ident)
    {
    global 
$CSRF_token_identifier$usersession;

    
$token generateCSRFToken($usersession$ident);
    return 
"data-csrf-token-identifier=\"{$CSRF_token_identifier}\" data-csrf-token=\"{$token}\"";
    }

This article was last updated 13th July 2020 15:05 Europe/London time based on the source file dated 8th July 2020 11:40 Europe/London time.