nodewords_basic.install in Nodewords: D6 Meta Tags 6.3
Same filename and directory in other branches
Install, update and uninstall functions for the Basic meta tags module.
File
nodewords_basic/nodewords_basic.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Basic meta tags module.
*/
/**
* Implements hook_install().
*/
function nodewords_basic_install() {
db_query("UPDATE {system} SET weight = 12 WHERE name = 'nodewords_basic' AND type = 'module'");
}
/**
* Implements hook_update_N().
*/
function nodewords_basic_update_6300() {
$ret = array();
$ret[] = update_sql("UPDATE nodewords SET content = REPLACE(content, 'indexfollow', 'index,follow') WHERE name='robots';");
$ret[] = update_sql("UPDATE nodewords SET content = REPLACE(content, 'indexnofollow', 'index,nofollow') WHERE name='robots';");
$ret[] = update_sql("UPDATE nodewords SET content = REPLACE(content, 'noindexfollow', 'noindex,follow') WHERE name='robots';");
$ret[] = update_sql("UPDATE nodewords SET content = REPLACE(content, 'noindexnofollow', 'noindex,nofollow') WHERE name='robots';");
return $ret;
}
/**
* Implements hook_uninstall().
*/
function nodewords_basic_uninstall() {
if (db_table_exists('nodewords')) {
$metatags = array(
'abstract',
'canonical',
'copyright',
'description',
'keywords',
'revisit-after',
'robots',
);
db_query("DELETE FROM {nodewords} WHERE name IN (" . db_placeholders($metatags, 'varchar') . ")", $metatags);
}
variable_del('nodewords_list_robots_index_follow');
variable_del('nodewords_list_robots_value');
}
Functions
Name![]() |
Description |
---|---|
nodewords_basic_install | Implements hook_install(). |
nodewords_basic_uninstall | Implements hook_uninstall(). |
nodewords_basic_update_6300 | Implements hook_update_N(). |