Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Summary

html_tag is no longer available as a theme function. It has been converted to a pre-render callback instead to simplify and improve performance.

API change

Any calls to theme('html_tag'); or within a render array '#theme' => 'html_tag' need to be converted to '#type' => 'html_tag'. Drupal 8 core does not use this, but contributed modules need to note this.

Before:

<?php
$output
= array(
 
'#theme' => 'html_tag',
 
'#tag' => 'meta',
 
'#attributes' => array(
   
'name' => 'Generator',
   
'content' => 'Drupal 8',
  ),
);
?>

After:

<?php
$output
= array(
 
'#type' => 'html_tag',
 
'#tag' => 'meta',
 
'#attributes' => array(
   
'name' => 'Generator',
   
'content' => 'Drupal 8',
  ),
);
?>

Before:

<?php
$meta_generator
= array(
 
'#tag' => 'meta',
 
'#attributes' => array(
   
'name' => 'Generator',
   
'content' => 'Drupal 8',
  ),
);
$output = theme('html_tag', array('element' => $meta_generator));
?>

After:

<?php
$meta_generator
= array(
 
'#type' => 'html_tag',
 
'#tag' => 'meta',
 
'#attributes' => array(
   
'name' => 'Generator',
   
'content' => 'Drupal 8',
  ),
);
$output = drupal_render($meta_generator);
?>
Impacts: 
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Not done