function _drupal_default_html_head
_drupal_default_html_head()
Returns elements that are always displayed in the HEAD tag of the HTML page.
File
- includes/common.inc, line 319
- Common functions that many Drupal modules will need to reference.
Code
function _drupal_default_html_head() { // Add default elements. Make sure the Content-Type comes first because the // IE browser may be vulnerable to XSS via encoding attacks from any content // that comes before this META tag, such as a TITLE tag. $elements['system_meta_content_type'] = array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array( 'http-equiv' => 'Content-Type', 'content' => 'text/html; charset=utf-8', ), // Security: This always has to be output first. '#weight' => -1000, ); // Show Drupal and the major version number in the META GENERATOR tag. // Get the major version. list($version, ) = explode('.', VERSION); $elements['system_meta_generator'] = array( '#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array( 'name' => 'Generator', 'content' => 'Drupal ' . $version . ' (http://drupal.org)', ), ); // Also send the generator in the HTTP header. $elements['system_meta_generator']['#attached']['drupal_add_http_header'][] = array('X-Generator', $elements['system_meta_generator']['#attributes']['content']); return $elements; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/_drupal_default_html_head/7.x