Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 3328 to 3334

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 25th November 2020 07:35 Europe/London time based on the source file dated 13th November 2020 15:00 Europe/London time.