Download & Extend

Ability to alter the popup registry (hook_popups_alter)

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).

AttachmentSize
popupalter.patch3.14 KB

Comments

#1

Status:needs review» fixed

Great stuff!

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.