function path_delete
Delete a URL alias.
Parameters
$criteria: A number representing the pid or an array of criteria.
6 calls to path_delete()
- LocalePathFunctionalTest::testPathLanguageConfiguration in modules/
locale/ locale.test - Test if a language can be associated with a path alias.
- path_admin_delete_confirm_submit in modules/
path/ path.admin.inc - Form submission handler for path_admin_delete_confirm().
- path_node_delete in modules/
path/ path.module - Implements hook_node_delete().
- path_node_update in modules/
path/ path.module - Implements hook_node_update().
- path_taxonomy_term_delete in modules/
path/ path.module - Implements hook_taxonomy_term_delete().
File
-
includes/
path.inc, line 466
Code
function path_delete($criteria) {
if (!is_array($criteria)) {
$criteria = array(
'pid' => $criteria,
);
}
$path = path_load($criteria);
if (isset($path['source'])) {
$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']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.