You are here

function panels_mini_delete in Panels 7.3

Same name and namespace in other branches
  1. 5.2 panels_mini/panels_mini.module \panels_mini_delete()
  2. 6.3 panels_mini/panels_mini.module \panels_mini_delete()
  3. 6.2 panels_mini/panels_mini.module \panels_mini_delete()

Remove a mini panel.

1 string reference to 'panels_mini_delete'
panels_mini_schema_1 in panels_mini/panels_mini.install
Schema version 1 for Panels in D6.

File

panels_mini/panels_mini.module, line 416
panels_mini.module

Code

function panels_mini_delete($mini) {
  db_delete('panels_mini')
    ->condition('name', $mini->name)
    ->execute();
  if (db_table_exists('block') && $mini->type != t('Overridden')) {

    // Also remove from block table as long as there isn't a default that may appear.
    db_delete('block')
      ->condition('delta', $mini->name)
      ->condition('module', 'panels_mini')
      ->execute();
  }
  return panels_delete_display($mini->did);
}