kasperbs
Member
Posted 1 year ago #
Hi,
Can you modify the source code of WordPress plugin and adapt it for several individual sites in a Multi Site environment?
I use the multi site feature in WordPress to host a few sites. One of the sites use a plugin where modify a file in the folder /wp-content/plugins/pluginsname. I'm now writing a new theme that requires the same plugin, but with a different modification. What is the standard way to get around that, so that both themes can use the same plugin independent of each other?
Yes, modify it to save that as an option.
kasperbs
Member
Posted 1 year ago #
Thanks.
Would mind ellaborating on the 'save that as an option' thing?
Well, I couldn't be really specific as I have no idea what plugin you're using or how it saves info to a file. ;)
You could also modify the plugin to save the file to the blog's uploads folder as well.
kasperbs
Member
Posted 1 year ago #
I was actually thinking generally. For example; I have a twitter plugin that consists of one file called twitter.php. In that file I need to specify the number of tweets to show.
Let's say I want to activate this plugin on another site but on that site show 5 tweets. How do I do that in a multi site environment? I still only have that file right?
Then that's a bad way to do it in a multisite environment. :)
Like I said above, code the plugin to save that value in the options table. Presto, it will save a different option for each site.
And the way to code that in woudl be the same way you'd do it for a single site.
kasperbs
Member
Posted 1 year ago #
Ahh ok. that's what I thought. I don't know how to code plugins unfortunately :-(.
I have a twitter plugin that consists of one file called twitter.php. In that file I need to specify the number of tweets to show.
I don't know how to code plugins unfortunately
Then for this, get a different twitter widget.