You are here

function path_breadcrumbs_delete in Path Breadcrumbs 7

Same name and namespace in other branches
  1. 7.3 path_breadcrumbs.module \path_breadcrumbs_delete()
  2. 7.2 path_breadcrumbs.module \path_breadcrumbs_delete()

Delete path breadcrumbs.

1 call to path_breadcrumbs_delete()
path_breadcrumbs_delete_form_submit in ./path_breadcrumbs.module
Submit callback for path_breadcrumbs_delete_form. Removes path breadcrumbs from database.

File

./path_breadcrumbs.module, line 392

Code

function path_breadcrumbs_delete($path_breadcrumb) {
  if (ctype_digit($path_breadcrumb)) {
    $path_id = $path_breadcrumb;
  }
  elseif (is_object($path_breadcrumb)) {
    $path_id = $path_breadcrumb->path_id;
  }
  else {
    return FALSE;
  }

  // Delete path breadcrumbs from database.
  $result = db_delete('path_breadcrumbs')
    ->condition('path_id', $path_id)
    ->execute();
  return $result;
}