You are here

remove_generator.module in Remove Generator META tag 7

Module file for Remove Generator.

File

remove_generator.module
View source
<?php

/**
 * @file
 * Module file for Remove Generator.
 */

/**
 * Implements hook_enable().
 */
function remove_generator_enable() {
  drupal_set_message(t('The Generator META tag has been removed.'));
}

/**
 * Implements hook_disable().
 */
function remove_generator_disable() {
  drupal_set_message(t('The Generator META tag has been restored.'));
}

/**
 * Implements hook_html_head_alter().
 */
function remove_generator_html_head_alter(&$head_elements) {

  // Remove Generator META tag.
  if (isset($head_elements['system_meta_generator'])) {
    unset($head_elements['system_meta_generator']);
  }
}