You are here

function quotes_install in Quotes 7

Same name and namespace in other branches
  1. 5 quotes.install \quotes_install()
  2. 6 quotes.install \quotes_install()

Implements hook_install().

File

./quotes.install, line 229
Handles installation and updates for the quotes module.

Code

function quotes_install() {
  node_types_rebuild();
  $types = node_type_get_types();
  node_add_body_field($types['quotes']);

  // Create a default vocabulary named "Quotes" for our content.
  _quotes_taxonomy_fields();

  // Set default variables.
  variable_set('quotes_author_bio', FALSE);
  variable_set('quotes_author_link', FALSE);
  variable_set('quotes_block_citation', FALSE);
  variable_set('quotes_leader', '—');
  variable_set('quotes_quick_nav', TRUE);
  variable_set('quotes_per_page', 10);
  variable_set('quotes_show_myquotes', TRUE);
  variable_set('quotes_showlink', TRUE);
  variable_set('quotes_user_recent', FALSE);
  variable_set('quotes_edit_link', TRUE);
  return t('The default vocabulary "Quotes" has been added. You may now setup category terms to categorize quotes');
}