You are here

function template_preprocess_text_resize_block in Text Resize 8

Implements hook_block().

File

./text_resize.module, line 61
Creates a small block with jQuery links that resize text in specified tag.

Code

function template_preprocess_text_resize_block(&$variables) {
  $config = \Drupal::config('text_resize.settings');
  $settings = $config
    ->get();
  if ($settings['text_resize_reset_button']) {
    $variables['content'] = [
      'output' => t('<a href="javascript:;" class="changer" id="text_resize_decrease"><sup>-</sup>A</a> <a href="javascript:;" class="changer" id="text_resize_reset">A</a> <a href="javascript:;" class="changer" id="text_resize_increase"><sup>+</sup>A</a><div id="text_resize_clear"></div>'),
    ];
  }
  else {
    $variables['content'] = [
      'output' => t('<a href="javascript:;" class="changer" id="text_resize_decrease"><sup>-</sup>A</a> <a href="javascript:;" class="changer" id="text_resize_increase"><sup>+</sup>A</a><div id="text_resize_clear"></div>'),
    ];
  }
}