Hi,

Replacing a theme function in the registry and keeping the old one is a really good practice but using just "link_default" or "menu_link_default" as old functions names, you are exposing your code to collision with other modules which could need the same as you (Menu Firstchild for example).
Here is a tiny patch without any possible side effects which prefixes theme registry keys with your module name. Thereby, your "(menul_link_default" won't be overrided.

I hope I am clear enough.
Regards.

CommentFileSizeAuthor
avoid-registry-collision.patch1.42 KBduaelfr

Comments

gagarine’s picture

Status: Needs review » Patch (to be ported)

Thanks!

gagarine’s picture

Status: Patch (to be ported) » Fixed

commited

duaelfr’s picture

Thank you :)

Status: Fixed » Closed (fixed)

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