function pagestyle_install in Page Style 7
Implement hook_install().
File
- ./
pagestyle.install, line 11 - This file install and uninstall the Page Style module.
Code
function pagestyle_install() {
$abbr_url = '<abbr title="' . t('Uniform Resource Locator') . '">URL</abbr>s';
$abbr_ajax = '<abbr title="' . t('Asynchronous JavaScript and XML') . '">AJAX</abbr>';
setcookie("pagestyle", 'standard', time() + 365 * 24 * 60 * 60, variable_get('pagestyle_cookie_domain', base_path(), ""));
$_SESSION['pagestyle'] = 'standard';
$link_cleanurls = l(t('Clean URLs'), 'admin/config/search/clean-urls', array(
'attributes' => array(
'title' => t('Internal link to:') . ' ' . t('Clean URLs'),
),
));
if (variable_get('pagestyle_javascript', 1) == 1 || variable_get('pagestyle_javascript', 1) == 2) {
drupal_set_message(t('Enable Clean !abbr_url for !abbr_ajax compatibility.', array(
'!abbr_url' => $abbr_url,
'!abbr_ajax' => $abbr_ajax,
)) . ' ' . $link_cleanurls, "warning");
}
}