Posted by Rob Loach on February 27, 2009 at 8:41pm
Jump to:
| Project: | Popups API (Ajax Dialogs) |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I'd like to change the default behavior of the popups_admin.module's rule registry in my own module, so this patch introduces hook_popups_alter(). Since the popup registry is now cached the performance hit is pretty much zero. It just allows modules to change the rule registry........
<?php
/**
* Implementation of hook_popups_alter().
*/
function mymodule_popups_alter(&$popups) {
// Remove acting on the primary tabs in the taxonomy page.
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;
}
?>Also adds popups.api.php to detail the hooks, like what's going in Drupal 7 HEAD (modulename.api.php).
| Attachment | Size |
|---|---|
| popupalter.patch | 3.14 KB |
Comments
#1
Great stuff!
#2
Automatically closed -- issue fixed for 2 weeks with no activity.