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

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

CommentFileSizeAuthor
popupalter.patch3.14 KBrobloach

Comments

starbow’s picture

Status: Needs review » Fixed

Great stuff!

Status: Fixed » Closed (fixed)

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