function panels_everywhere_page_manager_variant_operations_alter in Panels Everywhere 6
Same name and namespace in other branches
- 7 panels_everywhere.module \panels_everywhere_page_manager_variant_operations_alter()
Alter the panel context settings form.
File
- ./
panels_everywhere.module, line 343 - panels_everywhere.module
Code
function panels_everywhere_page_manager_variant_operations_alter(&$operations, $handler) {
// Do not add this to variants on the site template, as tempaltes cannot
// select templates.
if ($handler->task == 'site_template') {
return;
}
// Use this obnoxious construct to safely insert our item.
reset($operations['children']);
$new = array();
while (list($key, $value) = each($operations['children'])) {
$new[$key] = $value;
if ($key == 'summary') {
$new['panels_everywhere'] = array(
'title' => t('Template'),
'description' => t('Choose which site template to use for this page.'),
'form' => 'panels_everywhere_variant_template',
);
}
}
$operations['children'] = $new;
}