function template_preprocess_filter_guidelines

Same name and namespace in other branches
  1. 8.9.x core/modules/filter/filter.module \template_preprocess_filter_guidelines()
  2. 10 core/modules/filter/filter.module \template_preprocess_filter_guidelines()
  3. 11.x core/modules/filter/filter.module \template_preprocess_filter_guidelines()

Prepares variables for text format guideline templates.

Default template: filter-guidelines.html.twig.

Parameters

array $variables: An associative array containing:

  • format: An object representing a text format.

File

core/modules/filter/filter.module, line 358

Code

function template_preprocess_filter_guidelines(&$variables) {
    $format = $variables['format'];
    $variables['tips'] = [
        '#theme' => 'filter_tips',
        '#tips' => _filter_tips($format->id(), FALSE),
    ];
    // Add format id for filter.es6.js.
    $variables['attributes']['data-drupal-format-id'] = $format->id();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.