You are here

function simplemeta_preprocess_html in Simple Meta 8.2

Same name and namespace in other branches
  1. 8 simplemeta.module \simplemeta_preprocess_html()
  2. 7.2 simplemeta.module \simplemeta_preprocess_html()
  3. 7 simplemeta.module \simplemeta_preprocess_html()

Implements hook_preprocess_HOOK().

Preprocess html.

File

./simplemeta.module, line 33
Contains simplemeta.module.

Code

function simplemeta_preprocess_html(&$vars) {
  if (simplemeta_need_to_inject() && ($entity = simplemeta_get_page_meta()) && ($title = $entity->data->title)) {
    $vars['head_title'] = [
      'title' => Html::escape($title),
    ];
  }
}