3

I would like to develop an addon/extension plugin for an existing WordPress plugin, to add some premium features, but the base plugin's source-code is under GPLv2, which makes me doubtful...

Is any plugin developed for a product which is published under GPLv2 forced to be under GPL too? Or can we choose our own license?

I mean, forcing GPLv2 on plugins would be not very practical, no one would be able to create any plugin for any of such products (except when they do also use GPL as their plugin license)

For example, does that mean, we are legally NOT even allowed to develop any plugin for WordPress in the first place!? except when we do publish the plugin under GPL too.

(I could not find any plugin exception in WordPress's license)

4
  • 1
    Possible duplicate of WordPress: is extending plugin allowed by GPLv2?
    – MadHatter
    Commented Mar 16, 2019 at 9:45
  • @MadHatter, edited: I just want to prevent people from stating that "you should be asking a new question instead of commenting".
    – Top-Master
    Commented Mar 16, 2019 at 10:34
  • 1
    I understand, but it's good for follow-up questions to make clear and explicit reference to their predecessor. I saw you linked this one from the older one, but more helpful is to link the other way around, so people can see what's already happened in the discussion. It also means you don't need to repeat anything that's in the earlier question, which helps minimise the chance of having the newer one closed as a duplicate. At any rate, I'll withdraw my close vote and downvote, and perhaps try to write an answer.
    – MadHatter
    Commented Mar 17, 2019 at 8:33
  • 2

3 Answers 3

5

You intend to make a "plugin for a plugin" for Wordpress, where the plugin you're writing code to connect to is itself GPLv2, and you wish to know what your licensing obligations are.

The short answer is that GPLv2 s2b says that

You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License

There's no ambiguity or wiggle room here. If your program is a derivative of the existing wordpress plugin, you are bound by the original plugin's conditions for making derivative works, and so you must license the complete new work, when you distribute it, under GPLv2.

The question of "when is my code a derivative of another piece of code" is a matter of copyright law, not of licensing, and is harder to answer. For one thing it's jurisdictionally-dependent, and for another a number of jurisdictions lack significant case law on the subject. While courts are in no way obliged to respect it, the normal community line is to look to the FSF's interpretation, which frames the question in terms of the idea of the single combined work. It says that "It depends on how the main program invokes its plug-ins", boiling the analysis down to how your plugin and the GPL plugin interoperate. Many, including myself, have written more on that elsewhere on this site, and though you should read it we need not discuss it further here.

You write that "it will be depending on interpretation - that of judges", which is true, but not very helpful. The GPL has already been litigated a number of times, in a number of jurisdictions, as have some other copyleft licences, and they've stood up in court. If you're prosecuted for stealing a book from a shop, the outcome also depends on the interpretation of judges on the day. Historically, that interpretation has usually been that stealing is against the law, and you would be unwise to rely on it being different in your case. You also make the point that this will only apply if it goes to court, which is true, but are you sure you'd like to be the expensive test case?

0
0

I am not a lawyer, and below is my conclusions after reading another Answer:

The GPL license gives legally anyone the right of forcing us to change our plugin's license to GPL, or the right to simply use it ignoring our sub-license, but at least, I think we will never receive claims or complaints from the WordPress community itself.

See GPLv2 s2b:

"You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License"

Above is clear and without any ambiguity. If your program is a derivative of WordPress, you are bound by WordPress's conditions for making derivative works, and so you must license the complete new work, when you distribute it, under GPLv2.

Note that above only says "derivative", but not "plug-in", that is because we talk about v2 of GPL, and unlike v3, GPLv2 almost totally relies on the legal definition of derivative work, which allows judges to sometimes declare that the plug-in is not a derivative work (if case goes to court).

5
  • 4
    "If your program makes calls back and forth and shares 'data structures', then they could be considered the same program." - They would not be considered "the same program" but possibly one would be considered a derivative work of the other. And if your program is a derivative work of a GPL-licensed program, then you must comply with the GPL license to publish your program.
    – Brandin
    Commented Apr 17, 2019 at 5:29
  • @Brandin Does that mean any addon or plugin to any GPL software must be GPL because the very definition of an addon or plugin is that it extends the original program? Commented Jun 18, 2022 at 8:43
  • 1
    @ScottM.Stolz That's what the FSF believe, and in practice that's how GPL programs are handled. In GPL v3, I think the language is more explicit about this point, since GPL v3 explicitly mentions that the "corresponding source" includes the software that you dynamically link with, that you do intimate data communication with, etc. See also: gnu.org/licenses/gpl-faq.html#GPLPlugins. In GPL v2, the license relies almost totally on the legal definition of derivative work. And it's conceivable that a judge wouldn't be convinced that a plug-in is always legally a derivative work.
    – Brandin
    Commented Jun 20, 2022 at 8:16
  • @Brandin But how far does this "data structure" thing go? If you have Johnny that wrote a GPL script, and it has an API, and another program talks to Johnny's program via API, is that a shared data structure? That would mean that data in a GPL program can never leave a GPL program because other programs can't interact with it. Commented Jun 20, 2022 at 15:13
  • The FAQ that I linked to states GNU.org's opinion on it. If the API you have in mind is something similar in behaviour and purpose to a command-line interface, then they might be considered separate programs. See also: opensource.stackexchange.com/questions/12639/… Also read the GPL v3 itself for what it actually says, for example the paragraph containing the phrase "dynamically linked subprograms that the work is specifically designed to require".
    – Brandin
    Commented Jun 21, 2022 at 6:10
-2

Since you are modifying an existing plugin, then there isn't much room to play.

But if you would create plugin from scratch, then you wouldn't need to release it under GPL.

Using libraries or creating your own plugins from scratch are not derivative work since you aren't modifying existing code.

1
  • 1
    +1 for short and painless answer, but note that, even using libraries under GPL license is counted as derivative work, unless there is an exception in the license, like LGPL license; IANYL, but the only other exceptions are frameworks, like WordPress, where you do not need to be afraid (from being sued to bankruptcy, by their owners, at least not till now), but even there are some cases where you sure need to be afraid from being sued, like the Qt-framework
    – Top-Master
    Commented Apr 20, 2019 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.