html5_tools.install 693 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @file
  4. * Install file for the htm5_tools module.
  5. */
  6. /**
  7. * Implements hook_install().
  8. */
  9. function html5_tools_install() {
  10. // Set default date format for the ISO 8601 format type.
  11. $type = 'html5_tools_iso8601';
  12. $format = 'c';
  13. variable_set('date_format_' . $type, $format);
  14. }
  15. /**
  16. * Implements hook_uninstall().
  17. */
  18. function html5_tools_uninstall() {
  19. // Remove date format for the ISO 8601 format type.
  20. $type = 'html5_tools_iso8601';
  21. variable_del('date_format_' . $type);
  22. // Delete all the html5_tools variables and then clear the variable cache.
  23. db_query("DELETE FROM {variable} WHERE name LIKE 'html5_tools_%'");
  24. cache_clear_all('variables', 'cache');
  25. }