function panels_page_delete_confirm in Panels 5.2
Same name and namespace in other branches
- 6.2 panels_page/panels_page.admin.inc \panels_page_delete_confirm()
Provide a form to confirm deletion of a panel page.
1 string reference to 'panels_page_delete_confirm'
- panels_page_admin_menu_items in panels_page/
panels_page.module - Helper function to add a menu item for a panel.
File
- panels_page/
panels_page.admin.inc, line 140 - panels_page.admin.inc
Code
function panels_page_delete_confirm($panel_page) {
if (!is_object($panel_page)) {
$panel_page = panels_page_load($panel_page);
}
$form['pid'] = array(
'#type' => 'value',
'#value' => $panel_page->pid,
);
$form['did'] = array(
'#type' => 'value',
'#value' => $panel_page->did,
);
if ($panel_page->type != t('Overridden')) {
return confirm_form($form, t('Are you sure you want to delete "@title"?', array(
'@title' => panels_page_get_title($panel_page),
)), $_GET['destination'] ? $_GET['destination'] : 'admin/panels/panel-page', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}
else {
return confirm_form($form, t('Are you sure you want to revert "@title" to its default setup?', array(
'@title' => panels_page_get_title($panel_page),
)), $_GET['destination'] ? $_GET['destination'] : 'admin/panels/panel-page', t('This action cannot be undone.'), t('Revert'), t('Cancel'));
}
}