Remove "Drupal 7" generator metatag

Public

Removes the generator metatag added on all pages by Drupal. Place this on your theme's template.php or in a custom module.

</> CopyGet raw version
php
  1. /**
  2.  * Implements hook_html_head_alter().
  3.  *
  4.  * Removes the "Drupal 7" generator metatag.
  5.  */
  6. function YOURTHEME_html_head_alter(&$head_elements) {
  7. $key = 'system_meta_generator'; // If you aren't using the Metatag module.
  8. $key = 'metatag_generator'; // If you have the Metatag module enabled.
  9. unset($head_elements[$key]);
  10. }

Comments

But....'s picture

But you still knowing that a certain site run drupal if you look for "drupal.js" at the html source