Index: API.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/API.txt,v
retrieving revision 1.3.4.1
diff -u -r1.3.4.1 API.txt
--- API.txt	27 Apr 2007 01:13:31 -0000	1.3.4.1
+++ API.txt	9 Jan 2008 19:29:23 -0000
@@ -13,8 +13,8 @@
 Note that as of Pathauto 5-2 this API is vastly simplified.  If all you want is
 to enable tokens for your module you will simply need to implement two functions
 
-	hook_token_values
-	hook_token_list
+  hook_token_values
+  hook_token_list
 
 See the token.module for more information about this process.  
 
@@ -102,6 +102,21 @@
 
 
 ==================
+4 - Bulk delete hook
+==================
+
+For modules that create new types of pages that can be aliased with pathauto, a
+hook implementation is needed to allow the user to delete them all at once.
+
+function hook_path_alias_types()
+
+This hook returns an array whose keys match the beginning of the source paths
+(e.g.: "node/", "user/", etc.) and whose values describe the type of page (e.g.:
+"content", "users"). Like all displayed strings, these should be localized with
+t(). Use % to match interior pieces of a path; "user/%/track".
+
+
+==================
 Modules that extend node and/or taxonomy
 ==================
 
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.44.4.67
diff -u -r1.44.4.67 pathauto.module
--- pathauto.module	31 Dec 2007 20:03:09 -0000	1.44.4.67
+++ pathauto.module	9 Jan 2008 19:02:55 -0000
@@ -516,7 +516,7 @@
     '#description' => t('Delete aliases created by Pathauto 5.x-2.1 or higher.  Number of aliases which will be deleted: %count.', array('%count' => $total_count)));
 
   // Next, iterate over an array of objects/alias types which can be deleted and provide checkboxes
-  $objects = _pathauto_objects_to_delete();
+  $objects = module_invoke_all('path_alias_types');
   foreach ($objects as $internal_name => $label) {
     $count = db_result(db_query("SELECT count(1) FROM {url_alias} WHERE src LIKE '%s%%'", $internal_name));
     $form['delete'][$internal_name] = array('#type' => 'checkbox',
@@ -549,7 +549,7 @@
         db_query('DELETE {url_alias} ua,  {url_alias_extra} uax FROM {url_alias} ua INNER JOIN {url_alias_extra} uax on ua.pid = uax.pid and ua.dst = uax.dst');
         drupal_set_message(t('All of your path aliases have been deleted.'));
       }
-      $objects = _pathauto_objects_to_delete();
+      $objects = module_invoke_all('path_alias_types');
       if (array_key_exists($key, $objects)) {
         db_query("DELETE FROM {url_alias} WHERE src LIKE '%s%%'", $key);
         drupal_set_message(t('All of your %type path aliases have been deleted.', array('%type' => $objects[$key])));
@@ -559,7 +559,7 @@
   return 'admin/build/path/delete_bulk';
 }
 
-function _pathauto_objects_to_delete() {
+function pathauto_path_alias_types() {
   return array('user/' => t('users'), 'node/' => t('content') , 'taxonomy/' => t('vocabularies and terms'), 'blog/' => t('user blogs'), 'user/%/track' => t('user trackers'));
 }
 
