Not sure how, but this is something that I believe it is needed. Allow modules to insert links to a certain position.

hook_link is invoked by module order, but this may not be the desired order of links. For instance, some modules may add one or more links with a small icon (example: service links). This kind of links are much nicer at the end of the list. Nicer? Well, it depends, but hopefully you get the idea. So, what if a module loaded later adds a text link after the service links icons?

I hope you get what I mean.

The question is how could be "touch" hook_link with minimal impact to allow modules to insert links to a certain position? Passing the array by reference?

Comments

markus_petrux’s picture

I'm not sure what will happen with this issue.

Here's another one that is about to change how hook_link is implemented:
http://drupal.org/node/18260

Here's another one that has been just maked as a dup of #18260:
http://drupal.org/node/50220

Maybe cross-linking issues helps to get a better idea...

moshe weitzman’s picture

Status: Active » Fixed

hook_link has been reworked a lot and modules can alter links order. next step is for node links to enter into the new structured array for drupal_render(). mostly fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)