function panelizer_delete_panelizer_defaults in Panelizer 7.3
Same name and namespace in other branches
- 6 includes/admin.inc \panelizer_delete_panelizer_defaults()
- 7 includes/admin.inc \panelizer_delete_panelizer_defaults()
- 7.2 includes/admin.inc \panelizer_delete_panelizer_defaults()
Delete a panelizer node panel from the database.
File
- includes/
admin.inc, line 272 - Contains administrative forms and settings.
Code
function panelizer_delete_panelizer_defaults($panelizer) {
// Allow modules to react on a default Panelizer object before deletion.
// Triggers hook_panelizer_delete_default().
module_invoke_all('panelizer_delete_default', $panelizer);
if (!empty($panelizer->pnid)) {
if (!empty($panelizer->did)) {
panels_delete_display($panelizer->did);
}
db_delete('panelizer_defaults')
->condition('pnid', $panelizer->pnid)
->execute();
}
}