function pagestyle_standard in Page Style 5
Same name and namespace in other branches
- 6 includes/pagestyle.block.inc \pagestyle_standard()
- 7 includes/pagestyle.block.inc \pagestyle_standard()
Menu callback; change the pagestyle to Standard, then redirects to the previous page.
8 string references to 'pagestyle_standard'
- pagestyle_admin_settings in includes/
pagestyle.admin.inc - Builds and returns the pagestyle settings form.
- pagestyle_admin_settings_validate in includes/
pagestyle.admin.inc - Validate the pagestyle settings form.
- pagestyle_block_form_options in includes/
pagestyle.block.inc - Returns an array of available values for the select element in the block page style.
- pagestyle_menu in ./
pagestyle.module - Implement hook_menu().
- pagestyle_print_html in ./
pagestyle.module - Print HTMl code in the head
File
- includes/
pagestyle.block.inc, line 108 - Block, page and theme functions.
Code
function pagestyle_standard() {
$pagestyle_cookie_expires = pagestyle_cookie_expires($mode = 'php');
$pagestyle_cookie_domain = variable_get('pagestyle_cookie_domain', base_path());
$ps_name = t('Standard');
$pagestyle_message = variable_get('pagestyle_message', 1);
if (!isset($_COOKIE['pagestyle']) && $pagestyle_message == 1) {
drupal_set_message(t('The page style have not been saved, because your browser do not accept cookies.'), 'error');
}
else {
$_SESSION['pagestyle'] = 'standard';
setcookie("pagestyle", "standard", time() + $pagestyle_cookie_expires, $pagestyle_cookie_domain, "");
if ($pagestyle_message == 1) {
drupal_set_message(t('The page style have been saved as %ps_name.', array(
'%ps_name' => $ps_name,
)));
}
}
pagestyle_clear_cache();
drupal_goto();
}