WP Plugin Dependency: CMC 1.5: Interesting idea. This developer has built dependancy into their plugin to be forwards compatible with any other “click counter” type plugins that might be developed. I wonder if we could write in some hooks or triggers that would serially list defined functions and classes. Then a plugin developer would just check this list for the function that they want to define, and if not found, redefine/redeclare it. Same could go for variable names, though that could become overwhelming and resource hogging.
[EDIT] On second thought, an easier method would be to check every function/class for pre-definition before declaring/defining it as a rule (which is what I do outside of PHP)
Mark,
Could you post a translation for this so us simpletons can understand what you are saying? Thanks! :p
I can be pretty obscure!
Well, when plugin developers write functions as part of their plugins, or add database tables etc, they need to know whether a previous plugin might have written that table or declared that function in order to prevent serious breakage. This person has started to develop a framework to support future development in the “click” area. 🙂
Craig,
What I’ve tried to do with CMC is unify the whole click-counter genre of plugins. Why? Because there are so many possible ways of displaying the stats but very few ways to generate them. I thought that if I could create the perfect click counter to generate the stats, other plugins could specialize in displaying those stats: in text (a la Ozh’s ClickCounter), as graphical meters (see my sidebar for that one), as varying text sizes (like Flickr’s list of tags), or anything else you can think of.
If each of these plugins kept its own private stats table, the server would be doing a lot of extra work, as would the developers. CMC does the one thing that all click-statistics plugins have in common and because it focuses on only counting clicks, it does it very well. I hope is explains it.