Replace plugin function with theme function

I am currently rewritting the google map plugin to support more feature, and to add points in a KML file (this support plain html no need to encode it in javascript google map api dose it:) this will be more flexible, easier to style, and allow to add GPS tracks,...
Appart from these things that coul be generic and should work in any other theme, I need to add a few lines of code very specific to my theme, so I do not want to add it in the plugin.
Is it possible to write a function witht exactly the same name as the one provided with the plugin, but that would be overwritting the one from the pligin when using my theme? how should I do any ideas?

Comments

  • Yes, you can have two exactly (or almost) versions of the same plugin so long as the plugin names are different. Of course, you can enable only one or you will get conflicts.

    Depending on what the things specific to you theme are, you can also pass paramters, even optional ones, that modify the behavior. So, for instance, you could pass a function as an optional parameter. Then the plugin could test if the function was passed and if so, call it.
Sign In or Register to comment.