copyright_block.install in Copyright Block module 7.2
Same filename and directory in other branches
Install, update and uninstall functions for the Copyright Block module.
File
copyright_block.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Copyright Block module.
*/
/**
* Implements hook_install().
*/
function copyright_block_install() {
// Add default copyright block content.
variable_set('copyright_block_text', array(
'value' => t('Copyright © [site:name], [copyright_statement:dates].'),
'format' => 'full_html',
));
}
/**
* Implements hook_uninstall().
*/
function copyright_block_uninstall() {
db_query("DELETE FROM {variable} WHERE name LIKE 'copyright_block_%'");
}
/**
* Fix typo in variable name.
*/
function copyright_block_update_7200() {
variable_set('copyright_block_separator', variable_get('copyright_block_seperator'));
variable_del('copyright_block_seperator');
}
/**
* Change old versions of the copyright message from a string to an array.
*/
function copyright_block_update_7201() {
if (is_string($message = variable_get('copyright_block_text'))) {
variable_set('copyright_block_text', array(
'value' => $message,
'format' => 'filtered_html',
));
}
}
Functions
Name![]() |
Description |
---|---|
copyright_block_install | Implements hook_install(). |
copyright_block_uninstall | Implements hook_uninstall(). |
copyright_block_update_7200 | Fix typo in variable name. |
copyright_block_update_7201 | Change old versions of the copyright message from a string to an array. |