You are here

auto_nodetitle.install in Automatic Nodetitles 6

File

auto_nodetitle.install
View source
<?php

/**
 * Implementation of hook_install().
 */
function auto_nodetitle_install() {
  db_query("UPDATE {system} SET weight = 5 WHERE name = 'auto_nodetitle'");
}

/**
 * Implementation of hook_uninstall().
 */
function auto_nodetitle_uninstall() {
  foreach (node_get_types('names') as $type => $type_name) {
    variable_del('ant_' . $type);
    variable_del('ant_pattern_' . $type);
    variable_del('ant_php_' . $type);
  }
}

/**
 * make sure hooks are invoked after cck main hooks
 */
function auto_nodetitle_update_1() {
  $ret = array();
  $ret[] = update_sql("UPDATE {system} SET weight = 5 WHERE name = 'auto_nodetitle'");
  return $ret;
}

Functions

Namesort descending Description
auto_nodetitle_install Implementation of hook_install().
auto_nodetitle_uninstall Implementation of hook_uninstall().
auto_nodetitle_update_1 make sure hooks are invoked after cck main hooks