You are here

function persiantools_preprocess_html in PersianTools 8

Same name and namespace in other branches
  1. 7 persiantools.module \persiantools_preprocess_html()

Implements hook_preprocess_html().

File

./persiantools.module, line 10

Code

function persiantools_preprocess_html(&$variables) {
  $lang = \Drupal::languageManager()
    ->getCurrentLanguage()
    ->getId();
  if ($lang != 'fa' && $lang != 'ar') {
    return;
  }
  $variables['page']['#post_render'][] = 'persiantools_post_render_rtl';
}