Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/popups/Attic/README.txt,v
retrieving revision 1.1.2.14
diff -u -r1.1.2.14 README.txt
--- README.txt	6 Jan 2009 18:14:32 -0000	1.1.2.14
+++ README.txt	27 Feb 2009 20:39:18 -0000
@@ -83,6 +83,14 @@
        'noUpdate' => true, // Popup will not modify original page.
      ),
    );
+   
+   #4) Make your module alter the default popup rules with hook_popups_alter().
+   ----------------------------------------------------------------------------
+   hook_popups_alter() allows you to modify how the popup rules are
+   registered. This is useful to modify the default behavior of some
+   already existing popup rules.
+
+   See hook_popups_alter() in popups.api.php for an example.
 
   LIST OF POPUP OPITIONS
   ------------------------------------------------------------------------------------  
Index: popups.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/popups/popups.module,v
retrieving revision 1.11.2.22
diff -u -r1.11.2.22 popups.module
--- popups.module	27 Feb 2009 01:08:33 -0000	1.11.2.22
+++ popups.module	27 Feb 2009 20:39:18 -0000
@@ -185,8 +185,13 @@
     else { 
       // Call all hook_popups and cache results.
       $popups = module_invoke_all('popups');
+
+      // Invoke hook_popups_alter() to allow altering the default popups registry.
+      drupal_alter('popups', $popups);
+
+      // Save the popup registry in the cache.
       cache_set('popups:popups', $popups);
-    }  
+    }
   }
   return $popups;
 }
Index: popups.api.php
===================================================================
RCS file: popups.api.php
diff -N popups.api.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ popups.api.php	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,51 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Provides hook documentation for the Popups API.
+ */
+
+/**
+ * Creates the rule registry for the popups.
+ */
+function hook_popups() {
+  $popups = array();
+  $popups['admin/content/taxonomy'] = array(
+    // Act on the first primary tab. 
+    'div#tabs-wrapper a:eq(1)',
+    // Act on the 2nd column link in the table.
+    'table td:nth-child(2) a' => array(
+      // Don't update the original page.
+      'noUpdate' => TRUE,
+    ),
+  );
+  return $popups;
+}
+
+/**
+ * Allows altering of the popup rule registry.
+ *
+ * @param $popups
+ *   The popup registry to be altered.
+ */
+function hook_popups_alter(&$popups) {
+  // Remove acting on the primary tabs.
+  unset($popups['admin/content/taxonomy']['div#tabs-wrapper a:eq(1)']);
+
+  // Make clicking on the link update the original page.
+  $popups['admin/content/taxonomy']['table td:nth-child(2) a']['noUpdate'] = FALSE;
+}
+
+/**
+ * Adds skins to the Popups API.
+ *
+ * Returns an associative array where the key is the skin name, along
+ * with CSS and JS values to tell where the skin can be found.
+ */
+function hook_popups_skins() {
+  $skin['My Skin'] = array(
+    'css' => drupal_get_path('module', 'myskin') .'/myskin.css',
+    'js' => drupal_get_path('module', 'myskin') .'/myskin.js',
+  );
+}
