1 filter.module filter_editor_dialog_token($format, $dialog_name, $account = NULL, $path = NULL)

Generate a URL token for checking access to an editor dialog.

Note that we do not use backdrop_get_token() because it requires an active session.


stdClass $format: An object representing the text format.

string $dialog_name: The type of dialog that will be opened.

User $account: The user account that will be opening the dialog.

string $path: The path from which the dialog will be opened. Defaults to the current path.

Return value

string: A token intended to be used in a query string.


core/modules/filter/filter.module, line 908
Framework for handling the filtering of content.


function filter_editor_dialog_token($format, $dialog_name, $account = NULL, $path = NULL) {
  if (!isset($account)) {
    $account = $GLOBALS['user'];
  if (!isset($path)) {
    $path = $_GET['q'];
  $values = array(
  return backdrop_hmac_base64(implode('-', $values), backdrop_get_private_key() . backdrop_get_hash_salt());