I have own WP plugin under GPL2 license as need for WP, but now I wanna add some 3rd party code for directory listing and this code is under MIT license. What I need to do, that make all right and use this code in my plugin?

  • This is a licensing question, not a WordPress question – Mat Apr 10 '18 at 9:03

yes, you can include Expat (MIT) licensed libraries in your GPL plugin. WordPress plugin guidelines states,

Although any GPL-compatible license is acceptable, using the same license as WordPress — “GPLv2 or later” — is strongly recommended. All code, data, and images — anything stored in the plugin directory hosted on WordPress.org — must comply with the GPL or a GPL-Compatible license. Included third-party libraries, code, images, or otherwise, must be compatible.

Here is a list of licenses compatible with GPL.

  • One more question, in MIT license need write author name if you use his code. To where put this lines in WP plugin? On page in plugin where I am using his code or in readme? – user2481034 Apr 10 '18 at 10:03
  • if the library/code you are using is properly documented, its author should have some preamble in their code headers itself, hence you are not required to acknowledge/declare it. However, it is common and useful practice to add an acknowledgement in the readme.txt file. – Aurovrata Apr 10 '18 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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