HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Re: Sharing code across plugins
@River - Bad example ("Explain") because it steered you into debugging, coding readability, etc. What if I wanted to share my modified PorterStemmer code across some plugins? You see, all the answers that had valuable pointed and unrelated criticism, did not really suggest an ideal method for sharing code across plugins. I… -
Sharing code across plugins
I have several plugins the use the same functions. Currently each has a copy within the plugin's source file. This seems an unproductive way to maintain these functions (any change need to be manually copied to the other versions). My question is on the best practice to share functions across plugins. Hopefully the… -
Re: Sharing code across plugins
I wouldn't share! unless you had a plugin like useful functions. that many plugins used. plugins should be standalone, unless they require one another for a very definite reason. it is often a pain to have to load multiple plugins, if you really only need one and there is a possibility only one plugin feature is needed. or… -
Re: Sharing code across plugins
Indeed it is best to use existing functions. It would be great if we had a documented function list rather than searching for them in the core and then researching each to ensure the passed parameters are correctly set. Hard to tell. For example, I wrote an "explain" function that allows admins understand why a plugin… -
Re: Sharing code across plugins
Thanks! Reading both answers tells me that this is not cut and dry. I'd be happy to hear more from you as well as from others. Let's use a concrete example - consider pluginA and PluginB use a common function code functionA. Placing them in a huge pluginAB would require users to have both functionalities, complicates the…
5 results