I'm the developer and maintainer of a module on the Drupal website. It implements an API so that a certain third party service can be easily integrated in Drupal.
I'm currently having the following problem: I need to add a class-element to the logout link. So my module has to arrange that all the these links
<a href="/user/logout">Log out</a> becomes the following:
<a href="/user/logout" class="mymodule">Log out</a>
For the logout link in a menu it's easy, I have to implement
However, I also want to catch all occurences where somebody is using
l("Log out", "/user/logout"). The latter function calls
theme_link, so if I would implement that, I think it could solve my problem.
So my questions are:
- Can I implement theme_link in a module? If so, can somebody tell me how to do this?
- Is there another way in which the above could be accomplished by means of a module?