function path_delete

cis7 path.inc path_delete($criteria)
cle7 path.inc path_delete($criteria)
elmsmedia7 path.inc path_delete($criteria)
icor7 path.inc path_delete($criteria)
meedjum_blog7 path.inc path_delete($criteria)
mooc7 path.inc path_delete($criteria)

Delete a URL alias.

Parameters

$criteria: A number representing the pid or an array of criteria.

9 calls to path_delete()
pathauto_path_delete_multiple in sites/all/modules/ulmus/pathauto/pathauto.module
Delete multiple URL aliases.
path_admin_delete_confirm_submit in modules/path/path.admin.inc
Form submission handler for path_admin_delete_confirm().
path_file_delete in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_file_delete() on behalf of path.module.
path_file_update in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_file_update() on behalf of path.module.
path_node_delete in modules/path/path.module
Implements hook_node_delete().

... See full list

File

includes/path.inc, line 463
Functions to handle paths in Drupal, including path aliasing.

Code

function path_delete($criteria) {
  if (!is_array($criteria)) {
    $criteria = array('pid' => $criteria);
  }
  $path = path_load($criteria);
  $query = db_delete('url_alias');
  foreach ($criteria as $field => $value) {
    $query->condition($field, $value);
  }
  $query->execute();
  module_invoke_all('path_delete', $path);
  drupal_clear_path_cache($path['source']);
}