You are here

page_title.install in Page Title 6

File

page_title.install
View source
<?php

/**
 * Implementation of hook_install().
 */
function page_title_install() {
  drupal_install_schema('page_title');
}
function page_title_schema() {
  $schema['page_title'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'page_title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_uninstall().
 */
function page_title_uninstall() {
  db_query('DROP TABLE {page_title}');
  variable_del('page_title_individual');
  variable_del('page_title_front');
  foreach (node_get_types('names') as $type => $name) {
    variable_del("page_title_display_{$type}");
  }
}

Functions

Namesort descending Description
page_title_install Implementation of hook_install().
page_title_schema
page_title_uninstall Implementation of hook_uninstall().