You are here

function panelizer_delete_panelizer_defaults in Panelizer 7.3

Same name and namespace in other branches
  1. 6 includes/admin.inc \panelizer_delete_panelizer_defaults()
  2. 7 includes/admin.inc \panelizer_delete_panelizer_defaults()
  3. 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();
  }
}